[all-commits] [llvm/llvm-project] 577789: [CUDA] Assume the latest known CUDA version if we'...

Artem Belevich via All-commits all-commits at lists.llvm.org
Wed Jan 29 12:22:31 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 5777899f146aaa53f598e6978702a7a2725200d7
      https://github.com/llvm/llvm-project/commit/5777899f146aaa53f598e6978702a7a2725200d7
  Author: Artem Belevich <tra at google.com>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M clang/include/clang/Basic/Cuda.h
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/lib/Basic/Cuda.cpp
    M clang/lib/Driver/ToolChains/Cuda.cpp
    M clang/lib/Headers/__clang_cuda_runtime_wrapper.h
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/bin/.keep
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/include/.keep
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/lib/.keep
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/lib64/.keep
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/nvvm/libdevice/libdevice.10.bc
    A clang/test/Driver/Inputs/CUDA-unknown/usr/local/cuda/version.txt
    M clang/test/Driver/cuda-version-check.cu

  Log Message:
  -----------
  [CUDA] Assume the latest known CUDA version if we've found an unknown one.

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.

Differential Revision: https://reviews.llvm.org/D73231

(cherry picked from commit 12fefeef203ab4ef52d19bcdbd4180608a4deae1)




More information about the All-commits mailing list