[llvm-dev] cuda .cu compile error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] cuda .cu compile error

Tingyuan LIANG via llvm-dev
Dear list,

In cygwin, I encounter a problem below, any ideas?
$clang++ -O0 -g --cuda-gpu-arch=sm_35 -o vectorAddSimple2 vectorAddSimple2.cu --cuda-path='/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/' -L'/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/' -lcudart -save-temps -v
clang version 8.0.1
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\cygwin64\home\nancy\rpp_llvm\build_latest\Debug\bin
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.

It works fine in linux.
$clang++ -O0 -g --cuda-gpu-arch=sm_35 --cuda-path=/usr/local/cuda -o vectorAddSimple2 vectorAddSimple2.cu -L/usr/local/cuda/lib64 -lcudart -save-temps -v

--
Best Regards,
Nancy


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] cuda .cu compile error

Tingyuan LIANG via llvm-dev
I am not terribly surprised that it doesn't work on cygwin...

If you want help patching clang it shouldn't be too hard to get it to parse the contents of the cuda install, which is where it's currently failing.  No idea if it will work after you fix that, though.

On Thu, Apr 11, 2019, 9:47 PM Nancy via llvm-dev <[hidden email]> wrote:
Dear list,

In cygwin, I encounter a problem below, any ideas?
$clang++ -O0 -g --cuda-gpu-arch=sm_35 -o vectorAddSimple2 vectorAddSimple2.cu --cuda-path='/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/' -L'/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/' -lcudart -save-temps -v
clang version 8.0.1
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\cygwin64\home\nancy\rpp_llvm\build_latest\Debug\bin
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.

It works fine in linux.
$clang++ -O0 -g --cuda-gpu-arch=sm_35 --cuda-path=/usr/local/cuda -o vectorAddSimple2 vectorAddSimple2.cu -L/usr/local/cuda/lib64 -lcudart -save-temps -v

--
Best Regards,
Nancy

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev