StanfordLegion / legion

The Legion Parallel Programming System
https://legion.stanford.edu
Apache License 2.0
675 stars 145 forks source link

CUDA Compiler Detection fails when using Kokkos with unsupported Clang as CUDA compiler #1709

Open rbberger opened 2 months ago

rbberger commented 2 months ago

Issue mentioned in https://github.com/spack/spack/pull/45036

When using a newer Clang as CUDA compiler for Kokkos (newer than supported by CUDA), the current Legion CMake fails during CUDA Compiler Detection. The only workaround right now seems to be passing -DCMAKE_CUDA_FLAGS="--allow-unsupported-compiler -std=c++17" to Legion.

Example: Clang 17.0.6 and CUDA 11.7.1

Setting -DCMAKE_CUDA_FLAGS="--allow-unsupported-compiler" but without the -std=c++17 you get more errors.

Setting CMAKE_CUDA_STANDARD has no effect.

The errors seem to originate in find_package(Kokkos), prior to the Legion CMake logic in legion that tries to set the C++ standard for CUDA. It might require moving that logic before find_package(Kokkos).