[CUDA] One step compilation to PTX
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
I have had some good results using SYCL code with CUDA native frameworks by compiling my SYCL code to PTX and passing that to 3rd party frameworks. One step that is still inconvenient is compiling to PTX:
```
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-device-only source_a.cpp
clang++ -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-device-only source_b.cpp
llvm-link source_a-sycl-nvptx64-nvidia-cuda-sm_50.bc source_bsycl-nvptx64-nvidia-cuda-sm_50.bc ${SYLC_LIBDIR}/clc/libspirv-nvptx64--.bc -o full.bc
clang -target nvptx64-nvidia-cuda -S full.bc -o pathtracer.ptx
```
contrast this to:
```
clang++ -S source_a.cu source_b.cu
```
or
```
nvcc -ptx source_a.cu source_b.cu
```
A way to generate PTX directly from a single clang++ invocation given SYCL source code would be very helpful to me.
Contributor guide
Assessment
This issue has not been assessed yet.