Specify the kernel name or nvtx range for benchmarking.
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 927
- Forks
- 123
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Description
Right now it seems the intended method for benchmarking is simply encapsulating the kernel like so:
void my_benchmark(nvbench::state& state) {
state.exec([](nvbench::launch& launch) {
my_kernel<<<num_blocks, 256, 0, launch.get_stream()>>>();
});
}
NVBENCH_BENCH(my_benchmark);
What I have is more of an application built with multiple kernels (2 or more), so the benchmark looks more like this:
run_my_app(...) {
my_kernel1<<<num_blocks, 256, 0, launch.get_stream()>>>();
cudaDeviceSynchronize();
my_kernel2<<<num_blocks, 256, 0, launch.get_stream()>>>();
}
void my_benchmark(nvbench::state& state) {
run_my_app(params);
}
NVBENCH_BENCH(my_benchmark);
What I would like to ask/request is (1) if there was an option to specify which kernel to benchmark within the app (either through kernel name or nvtx range). And (2) currently, I have the wrapper around the whole application, is it aggregating different kernel launch metrics provided by cupti? When I see the following output, which kernels is it reporting for (or is it aggregated for all launches)?
| HBWPeak | LoadEff | StoreEff | L1HitRate | L2HitRate | Samples | Samples | CPU Time | Noise | GPU Time | Noise |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.03% | 64.10% | 85.46% | 19.56% | 47.72% | 3x | 1024x | 563.111 us | 41.55% | 558.423 us | 41.54% |
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the benchmark wrapper around run_my_app and inspect how CUPTI metrics are collected across multiple kernel launches. Determine whether the current output aggregates all launches, then assess how kernel names or NVTX ranges could select one launch. Done means the requested selection behavior and aggregation semantics are documented or implemented with validation for multi-kernel applications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100