Re: clang: error: cannot find libdevice for sm_75. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.


Pei JIA
 


Nope... I have ONLY Cuda 11.4 installed. Here is the result of **nvidia-smi**.


➜  ~ nvidia-smi
Tue Aug 24 10:57:12 2021      
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.63.01    Driver Version: 470.63.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:21:00.0  On |                  N/A |
|  0%   43C    P5    35W / 300W |    753MiB / 11016MiB |     26%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                              
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1696      G   /usr/lib/xorg/Xorg                102MiB |
|    0   N/A  N/A      2717      G   /usr/lib/xorg/Xorg                378MiB |
|    0   N/A  N/A      2849      G   /usr/bin/gnome-shell               69MiB |
|    0   N/A  N/A     12356      G   ...AAAAAAAAA= --shared-files       88MiB |
|    0   N/A  N/A     25420      G   obs                                40MiB |
|    0   N/A  N/A    916198      G   ...AAAAAAAAA= --shared-files       24MiB |
|    0   N/A  N/A   2152246      G   /proc/self/exe                      9MiB |
+-----------------------------------------------------------------------------+



On 2021-08-23 10:51 p.m., Larry Gritz wrote:
You say you have Cuda 11.4, but the error message says:

error: GPU arch sm_75 is supported by CUDA versions between 10.0 and 11.0 (inclusive), but installation at /usr/local/cuda is 7.0. 

Maybe you have multiple cuda versions installed?

I think that when you first configure the cmake build, you can use -DCUDA_TOOLKIT_ROOT_DIR=... to point it at a particular Cuda install.
 

On Aug 23, 2021, at 10:28 PM, Pei JIA <jiapei@...> wrote:


Hi, all:


I failed to build current OpenShadingLanguage master branch with the following ERROR messages:



[ 18%] Generating simplexnoise_cuda.bc
cd ....../OpenShadingLanguage/src/liboslexec && /usr/lib/llvm-11/bin/clang++ -I/usr/local/cuda/include -I/usr/local/cuda/include -I....../OpenShadingLanguage/src/liboslexec -I....../OpenShadingLanguage/build/include -I....../OpenShadingLanguage/src/include -I....../OpenShadingLanguage/src/cuda_common -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -DOSL_FAST_MATH=1 -DOSL_USE_OPTIX=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DOSL_LLVM_VERSION=110 -DOSL_LLVM_FULL_VERSION="11.0.0" -Dosoparse=OSL_v1_12_3_osoparse -Doslparse=OSL_v1_12_3_oslparse -std=c++14 -DOSL_FAST_MATH=1 -DOSL_USE_OPTIX=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DOSL_LLVM_VERSION=110 -DOSL_LLVM_FULL_VERSION="11.0.0" -Dosoparse=OSL_v1_12_3_osoparse -Doslparse=OSL_v1_12_3_oslparse -DOSL_LLVM_CUDA_BITCODE -std=c++14 --cuda-path=/usr/local/cuda -D__CUDACC__ -DOSL_COMPILING_TO_BITCODE=1 -DNDEBUG -DOIIO_NO_SSE -D__CUDADEVRT_INTERNAL__ --language=cuda --cuda-device-only --cuda-gpu-arch=sm_75 -Wno-deprecated-register -Wno-format-security -O3 -fno-math-errno -ffast-math -S -emit-llvm ../liboslnoise/simplexnoise.cpp -o ....../OpenShadingLanguage/build/src/liboslexec/simplexnoise_cuda.s
clang: error: cannot find libdevice for sm_75. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang: error: GPU arch sm_75 is supported by CUDA versions between 10.0 and 11.0 (inclusive), but installation at /usr/local/cuda is 7.0. Use --cuda-path to specify a different CUDA install, pass a different GPU arch with --cuda-gpu-arch, or pass --no-cuda-version-check.
make[2]: *** [src/liboslexec/CMakeFiles/oslexec.dir/build.make:692: src/liboslexec/simplexnoise_cuda.bc] Error 1
make[2]: Leaving directory '....../OpenShadingLanguage/build'
make[1]: *** [CMakeFiles/Makefile2:1307: src/liboslexec/CMakeFiles/oslexec.dir/all] Error 2
make[1]: Leaving directory '....../OpenShadingLanguage/build'
make: *** [Makefile:169: all] Error 2
➜  build git:(master) ccmake ../


Can anybody give me a hand please?


  • My environments:
    • OS: Ubuntu 20.04
    • GCC: 10.3.1
    • GPU: Geforce 2080 Ti
    • NVIDIA Driver: 470.63.01
    • CUDA: 11.4


Thank you...


--
Dr. Pei Jia
CTO of Longer Vision Technology (Canada) Ltd.
Email: jiapei@...
Cell Number: +1 778-863-5816

--
Larry Gritz




--
Dr. Pei Jia
CTO of Longer Vision Technology (Canada) Ltd.
Email: jiapei@...
Cell Number: +1 778-863-5816

Join osl-dev@lists.aswf.io to automatically receive all group messages.