[PATCH] D73231: [CUDA] Assume the latest known CUDA version if we've found an unknown one.
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 22 14:22:28 PST 2020
tra created this revision.
tra added reviewers: timshen, yaxunl.
Herald added subscribers: sanjoy.google, bixia.
Herald added a project: clang.
This makes clang somewhat forward-compatible with new CUDA releases without
having to patch it for every minor release without adding any new function.
If an unknown version is found, clang issues a warning (can be disabled with -Wno-cuda-unknown-version)
and assumes that it has detected the latest known version. CUDA releases are usually supersets
of older ones feature-wise, so it should be sufficient to keep released clang versions
working with minor CUDA updates without having to upgrade clang, too.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73231
Files:
clang/include/clang/Basic/Cuda.h
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Basic/DiagnosticGroups.td
clang/lib/Basic/Cuda.cpp
clang/lib/Driver/ToolChains/Cuda.cpp
clang/lib/Headers/__clang_cuda_runtime_wrapper.h
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/bin/.keep
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/include/.keep
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/lib/.keep
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/lib64/.keep
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/nvvm/libdevice/libdevice.10.bc
clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/version.txt
clang/test/Driver/cuda-version-check.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73231.239695.patch
Type: text/x-patch
Size: 7240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200122/03bd6b67/attachment-0001.bin>
More information about the cfe-commits
mailing list