Im using clangd
with my editor and I’ve already set it up to work with cuda
reasonably till I tried to edit cuda example provided with the sdk simpleAWBarrier
.
Whenever we include <cuda/barrier>
, it gives out an error
CUDA device code does not support variadic functions
I could see the same error if I try to build the example with clang
as well.
Does not clang
support variadic device functions yet? Or is there some flag to enable this feature?
The command I’m using to build the example is
clang++ -I/opt/cuda-11.5/samples/common/inc --cuda-gpu-arch=sm_80 -o simpleAWBarrier.o -c simpleAWBarrier.cu --cuda-path=/opt/cuda/cuda-11.5/
clang version:
clang++ --version
clang version 14.0.0 (524758d1a75e21a9133b597ea649237d75a46abb)
Target: x86_64-unknown-linux-gnu
Thread model: posix