[PATCH] D89752: [CUDA] Improve clang's ability to detect recent CUDA versions.

Evgeny Mankov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 03:51:56 PDT 2020


emankov accepted this revision.
emankov added a comment.
This revision is now accepted and ready to land.

Thank you!
I've successfully applied your change in `Cuda.cpp` to the following clang versions: `10.0.0`, `10.0.1`, `11.0.0`, and `12.0.0git`; and have created the working patches (#206 <https://github.com/ROCm-Developer-Tools/HIPIFY/pull/206>).



================
Comment at: clang/test/Driver/cuda-version-check.cu:13
 // RUN:    FileCheck %s --check-prefix=UNKNOWN_VERSION
+// CUDA-11.1 does not carry version.txt file. Make sure we still detect it as a
+// new version and handle it the same as we handle other new CUDA versions.
----------------
tra wrote:
> emankov wrote:
> > CUDA-11.0 Update 1 doesn't carry version.txt as well.
> > CUDA-11.0 Update 1 doesn't carry version.txt as well.
> 
> This assertion appears to be incorrect. I've just installed 11.0 update1 using Ubuntu [[ https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run | .run ]] installer I've got from https://developer.nvidia.com/cuda-11.0-update1-download-archive  and the installed version does have version.txt saying 
> 
> ```
> CUDA Version 11.0.228
> ```
> 
> Did you use some other installer variant?
> 
```
"c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\nvcc" --version                                                                                                             nvcc: NVIDIA (R) Cuda compiler driver                                                                                                                                                                               Copyright (c) 2005-2020 NVIDIA Corporation                                                                                                                                                                          Built on Wed_Jul_22_19:09:35_Pacific_Daylight_Time_2020                                                                                                                                                             Cuda compilation tools, release 11.0, V11.0.221                                                                                                                                                                     Build cuda_11.0_bu.relgpu_drvr445TC445_37.28845127_0         
```
CUDA Version 11.0.221 (distributive [[ http://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_451.82_win10.exe | cuda_11.0.3_451.82_win10.exe ]]) doesn't have version.txt as well.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89752/new/

https://reviews.llvm.org/D89752



More information about the cfe-commits mailing list