This is a follow-up to D89752,
If CUDA version can not be determined based on version.txt file, attempt to find CUDA_VERSION macro in cuda.h.
Paths
| Differential D89832
[CUDA] Extract CUDA version from cuda.h if version.txt is not found ClosedPublic Authored by tra on Oct 20 2020, 3:53 PM.
Details
Diff Detail
Event Timelinetra added a parent revision: D89752: [CUDA] Improve clang's ability to detect recent CUDA versions..Oct 20 2020, 4:11 PM This revision now requires changes to proceed.Oct 22 2020, 2:12 AM
This revision is now accepted and ready to land.Oct 22 2020, 11:31 AM Comment Actions
Thank you! I appreciate your help testing this patch. I'll land the patches shortly.
Revision Contents
Diff 299501 clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/lib/Driver/ToolChains/Cuda.h
clang/lib/Driver/ToolChains/Cuda.cpp
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/bin/.keep
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/include/.keep
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/lib/.keep
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/lib64/.keep
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/nvvm/libdevice/libdevice.10.bc
clang/test/Driver/Inputs/CUDA_102/usr/local/cuda/version.txt
clang/test/Driver/Inputs/CUDA_111/usr/local/cuda/include/cuda.h
clang/test/Driver/cuda-version-check.cu
|
Please, add CudaVersion::CUDA_111 declaration in Cuda.h and a corresponding if here.
Btw, switch is possible here.