-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!
Description
After we merged #1544 which added a version check:
Lines 548 to 553 in 3cafa97
| #ifdef __CUDACC__ | |
| #if __CUDACC_VER_MAJOR__ < 10 \ | |
| || (__CUDACC_VER_MAJOR__ == 10 \ | |
| && (__CUDACC_VER_MINOR__ < 1 || (__CUDACC_VER_MINOR__ == 1 && __CUDACC_VER_BUILD__ < 243))) | |
| #error STL1002: Unexpected compiler version, expected CUDA 10.1 Update 2 or newer. | |
| #endif // ^^^ old CUDA ^^^ |
This breaks CUDA with any Clang version that does not report CUDA > 10.1 (i.e. Clang from 11.0.0 to main can build with CUDA 10.1+ but always reports 10.1)
And as the Clang version 11.0.0+ seems to be supported otherwise (implementsif constexpr), it'd be great if we could just add a check whether clang is used or nvcc (or nvc++..)
I was unaware that Clang could compile CUDA code. This is detectable through predefined macros:
https://llvm.org/docs/CompileCudaWithLLVM.html#detecting-clang-vs-nvcc-from-code
We should consider:
- Refining this version check (adding
!defined(__clang__)to the last test might be correct) - Adding test coverage for this scenario (which should be possible as we have both Clang and the CUDA SDK installed on the CI machines)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!