Skip to content

feature: Support building CUDA backend kernels with clang++ #251

@raffenet

Description

@raffenet

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:

  1. NVCC_FLAGS is ignored when supplying an alternative NVCC in the configuration environment. Addressed in backend/cuda: Use NVCC_FLAGS with user-provided NVCC #250.
  2. CUDA_SM code generation flags from configure are not compatible with clang++. Need to use the right flags based on the compiler used.
  3. 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 a bool type, but it is not guaranteed to be compatible, so we need some special handling to do the right thing.
  4. clang++ warns that the -Xcompiler option used by cudalt.sh is unrecognized. We should omit it when using clang++.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions