NVIDIA / NVIDIA/cccl

[FEA]: API for cuda/ptx jit compilation and linking

Open
#5,312 1 comment 0 reactions 0 assignees View on GitHub
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.

When working on `cudax::library` construction, I found out that the `cuLibraryLoadData` function does not only load the given cubin or fabin, but also compiles PTX code and I realized that I cannot just pack all of the functionality into the constructor.

### Describe the solution you'd like

That brought me to idea of implementing API for JIT compilation and linking done by NVRTC, nvJITLink and nvPTXCompiler libraries. I've started implementing some ideas in #5311.

For now, I've introduced set of `compile_to_xxx` functions, but after discussion with @caugonnet, it might be more suitable to create a type for cuda/ptx compiler which could e. g. take advantage of caching.

I know there is already some kind of internal wrapper for NVRTC in the cccl/c api, but I think we could provide something more complex

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.