clang-cl does not recognize -Xcuda-ptxas flags
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
**Describe the bug**
clang++ accepts the -Xcuda-ptxas flag to allow passing of options to NVIDIA PTXAS.
clang-cl does not accept this flag (which means I have no means of passing options to PTXAS).
**To Reproduce**
Code (modified version of the vector-add example from the oneAPI-samples repo):
[vector-add-buffers.txt](https://github.com/intel/llvm/files/13069666/vector-add-buffers.txt)
With `clang++ -v -fsycl -fsycl-targets=nvptx64-nvidia-cuda vector-add-buffers.cpp -o vector-add-buffers.exe -Xcuda-ptxas --maxrregcount=128`, I can see the `--maxrregcount` argument being passed to PTXAS (twice actually!).
With `clang-cl -v -fsycl -fsycl-targets=nvptx64-nvidia-cuda /EHsc vector-add-buffers.cpp -o vector-add-buffers.exe -Xcuda-ptxas --maxrregcount=128` the arguments are not passed to ptxas and I get:
`clang-cl: warning: unknown argument ignored in clang-cl: '-Xcuda-ptxas' [-Wunknown-argument]`
`clang-cl: warning: unknown argument ignored in clang-cl: '--maxrregcount=128' [-Wunknown-argument]`
I would like to request that clang-cl recognizes the -Xcuda-ptxas flag and passes the arguments onto PTXAS.
I tried to find a workaround but did not succeed.
**Environment (please complete the following information):**
- OS: Windows 10 Pro
- Target device and vendor: NVIDIA GeForce RTX 2080 Super
- DPC++ version: `sycl` branch, commit 47083f847f5059c435ec7dece4bb633f78e2946f (tag: nightly-2023-09-28)
- Dependencies version: CUDA 12.2
Contributor guide
Assessment
This issue has not been assessed yet.