Closed TysonRayJones closed 5 years ago
(Note the same code compiles with CUDA 9.2 on MacOS 10.14 - perhaps this is a Ubuntu-specific issue)
You need to name your source file with extension .cu
to make nvcc
interpret the CUDA code correctly. Then, calling nvcc -DVIENNACL_WITH_CUDA -IViennaCL demo.cu
should succeed.
An alternative is to pass -x cu
to nvcc
: https://stackoverflow.com/questions/26208784/cuda-cpp-files
Right you are - it's curious this wasn't needed on MacOS. Thanks very much for the prompt help (and for your work on a fantastic library)!
Hi,
I'm trying to compile a simple example:
with command
and file structure
ViennaCL/viennacl/matrix.hpp
(etc).This causes a pretty huge error I've pasted into this pastebin, which begins with:
I take it the CUDA syntax isn't being recognised. This seems specific to ViennaCL, since I CUDA compile other projects (e.g. QuEST) without issue on this system.
Is ViennaCL incompatible with CUDA 9.1? I'm compiling for a Quadro P6000 with computability 6.1, so need to use at least CUDA 8.0. Is there any way I can make this work?