samedi 18 mars 2023

CUDA Toolkit 12.1 - Issue when compiling samples

I installed Cudatoolkit 12.1 on laptop with Ubuntu 22.04. The GPU is the mobile RTX 3080, CPU is AMD 5900HX. GCC version is 12.2.

The install went fine and it mostly seems to be working fine. I decided to compile all the cuda samples and got this error -

>>> GCC Version is greater or equal to  5.1.0 <<<
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --std=c++11 --threads 0 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o simpleAWBarrier.o -c simpleAWBarrier.cu
/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda/std/barrier(144): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, cuda::std::__4::__barrier_base<cuda::std::__4::__empty_completion, 2> *)
         new (&__b->__barrier) __barrier_base(__expected); 
         ^

1 error detected in the compilation of "simpleAWBarrier.cu".
make: *** [Makefile:361: simpleAWBarrier.o] Error 255
>>> GCC Version is greater or equal to  5.1.0 <<<
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --std=c++11 --threads 0 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o globalToShmemAsyncCopy.o -c globalToShmemAsyncCopy.cu
/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda/std/barrier(144): error: function "operator new" cannot be called with the given argument list
            argument types are: (unsigned long, cuda::std::__4::__barrier_base<cuda::std::__4::__empty_completion, 2> *)
         new (&__b->__barrier) __barrier_base(__expected); 
         ^

1 error detected in the compilation of "globalToShmemAsyncCopy.cu".
make[1]: *** [Makefile:355: globalToShmemAsyncCopy.o] Error 255

The error has shown up with at least two different programs. Both indicate an issue with in "...include/cuda/std/barrier".

Is this an issue with CUDA or the compile options?

Aucun commentaire:

Enregistrer un commentaire