Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs_input/notebooks/gtc_lab/samples/kernel_fusion.cu
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
for (int i = 0; i < 10; i++) {

// first individual, independent kernels
int unfused_range = MATX_NVTX_START_RANGE("Unfused Kernels");
[[maybe_unused]] int unfused_range = MATX_NVTX_START_RANGE("Unfused Kernels");
(result = cos(C)).run(exec);
(result = result / D).run(exec);
(result = result * B).run(exec);
MATX_NVTX_END_RANGE(unfused_range);

// now, as a fused operation
int fused_range = MATX_NVTX_START_RANGE("Fused Operation");
[[maybe_unused]] int fused_range = MATX_NVTX_START_RANGE("Fused Operation");
(A = B * cos(C)/D).run(exec);
MATX_NVTX_END_RANGE(fused_range);
}
Expand Down
5 changes: 3 additions & 2 deletions examples/kernel_fusion.cu
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
for (int i = 0; i < 10; i++) {

// first individual, independent kernels
int unfused_range = MATX_NVTX_START_RANGE("Unfused Kernels");
[[maybe_unused]] int unfused_range = MATX_NVTX_START_RANGE("Unfused Kernels");
(result = cos(C)).run(exec);
(result = result / D).run(exec);
(result = result * B).run(exec);
MATX_NVTX_END_RANGE(unfused_range);

// now, as a fused operation
int fused_range = MATX_NVTX_START_RANGE("Fused Operation");
[[maybe_unused]] int fused_range = MATX_NVTX_START_RANGE("Fused Operation");
(A = B * cos(C)/D).run(exec);
MATX_NVTX_END_RANGE(fused_range);

}
MATX_EXIT_HANDLER();
}