[CUDA] Improve CUDA version detection and diagnostics.Always use cuda.h to detect CUDA version. It's a more universal approachcompared to version.txt which is no longer present in recent CUDA vers
[CUDA] Improve CUDA version detection and diagnostics.Always use cuda.h to detect CUDA version. It's a more universal approachcompared to version.txt which is no longer present in recent CUDA versions.Split the 'unknown CUDA version' warning in two:* when detected CUDA version is partially supported by clang. It's expected towork in general, at the feature parity with the latest supported CUDAversion. and may be missing support for the new features/instructions/GPUvariants. Clang will issue a warning.* when detected version is new. Recent CUDA versions have been working withclang reasonably well, and will likely to work similarly to the partiallysupported ones above. Or it may not work at all. Clang will issue a warning andproceed as if the latest known CUDA version was detected.Differential Revision: https://reviews.llvm.org/D108247
show more ...
[CUDA] Assume the latest known CUDA version if we've found an unknown one.This makes clang somewhat forward-compatible with new CUDA releaseswithout having to patch it for every minor release with
[CUDA] Assume the latest known CUDA version if we've found an unknown one.This makes clang somewhat forward-compatible with new CUDA releaseswithout having to patch it for every minor release without addingany new function.If an unknown version is found, clang issues a warning (can be disabledwith -Wno-cuda-unknown-version) and assumes that it has detectedthe latest known version. CUDA releases are usually supersetsof older ones feature-wise, so it should be sufficient to keepreleased clang versions working with minor CUDA updates withouthaving to upgrade clang, too.Differential Revision: https://reviews.llvm.org/D73231