yaksa
yaksa copied to clipboard
feature: Support building CUDA backend kernels with `clang++`
A user reported being unable to build MPICH using clang++
as the CUDA compiler used to build Yaksa pmodels/mpich#6954. Noting down the issues encountered trying to build like this:
-
NVCC_FLAGS
is ignored when supplying an alternativeNVCC
in the configuration environment. Addressed in #250. - CUDA_SM code generation flags from configure are not compatible with
clang++
. Need to use the right flags based on the compiler used. - Building
.cu
files with clang/clang++ puts the compiler in C++ mode. CUDA kernels with the C_Bool
type cannot be compiled since that type is not in C++. C++ has abool
type, but it is not guaranteed to be compatible, so we need some special handling to do the right thing. -
clang++
warns that the-Xcompiler
option used bycudalt.sh
is unrecognized. We should omit it when usingclang++
.
Does clang
work or does it have to be clang++
?
We should standardize it between MPL and yaksa, maybe as a Autoconf macro in a .m4 file. We can manually copy to yaksa for now.
Does
clang
work or does it have to beclang++
?We should standardize it between MPL and yaksa, maybe as a Autoconf macro in a .m4 file. We can manually copy to yaksa for now.
I tried NVCC=clang
and it produced the same error about _Bool
not defined.