[FEA]: Consider extending cuda::launch() config with optional "name"
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 486
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 295
Description
### Is this a duplicate?
- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)
### Area
CUDA Experimental (cudax)
### Is your feature request related to a problem? Please describe.
As a user of `cuda::launch(...)` to launch my kernels, I would like to be able to customize the name of the kernel that shows up in the nsys profile because the default name may be indecipherable and unhelpful.
### Describe the solution you'd like
I'd like to extend the configuration object passed to `cuda::launch` to take an optional string-like parameter:
```
auto config = cudax::make_config(hierarchy, cuda::kernel_name{"my custom kernel"});
// assert( config.name() == "my custom kernel");
cudax::launch(stream, config, kernel, ...);
```
In addition to being able to query the name later, I'd like it to be used internally such that when I profile this code with nsys/ncu the kernel's name is `"my custom kernel"`.
### Describe alternatives you've considered
_No response_
### Additional context
I'm not actually sure if this is possible today without new CUPTI/NVTX APIs.
At minimum, we could insert a custom NVTX push/pop range with the custom name, but that isn't the same as literally renaming the kernel itself.
NCU does support kernel renaming, but this is done at runtime via a config file. We'd want a programmatic way of doing the same thing.
https://docs.nvidia.com/nsight-compute/NsightComputeCli/index.html#kernel-renaming
Contributor guide
Assessment
This issue has not been assessed yet.