[CUDA] CUDA device code does not support variadic functions in clang

Early versions of PTX (up until CUDA-9.0/ PTX 6.0) did not support variadic functions on GPU.

Clang did impelment special case handling for printf, but I don’t think we’ve implemented general support for variadic functions.

In general, I would not expect CUDA’s standard c++ library (which is what cuda/barrier actually uses) to compile with clang. It will likely need both changes to clang and portability fixes to the library headers.

Currently compilation fails even if we relax checks for varargs functions: Compiler Explorer

1 Like