Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang: CUDA compile with -nocudalib gives "use of undeclared identifier cudaConfigureCall" #86660

Open
robquill opened this issue Mar 26, 2024 · 0 comments
Labels
clang Clang issues not falling into any other category cuda

Comments

@robquill
Copy link

Hi,

I am trying to compile some CUDA code without using libdevice.10.bc. To do this, I used the -nocudalib option.

Compiling the attached vecadd.cu without -nocudalib it compiles successfully:

$ clang++ vecadd.cu -emit-llvm -c --cuda-path=/usr/local/cuda-12.3
$

But compiling with -nocudalib gives this error:

$ clang++ vecadd.cu -emit-llvm -c --cuda-path=/usr/local/cuda-12.3 -nocudalib
vecadd.cu:69:11: error: use of undeclared identifier cudaConfigureCall
   69 |     vecAdd<<<gridSize, blockSize>>>(d_a, d_b, d_c, n);
      |           ^
1 error generated when compiling for sm_52.
$

My clang version is:

$ clang++ --version
Ubuntu clang version 19.0.0 (++20240325031437+564035edb0e6-1~exp1~20240325151556.1579)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin

And I'm using CUDA Toolkit 12.3.

That said, I also see this back with LLVM 14 and a range of CUDA Toolkits back to 10.1.

vecadd.zip

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category cuda
Projects
None yet
Development

No branches or pull requests

2 participants