https://github.com/bzEq created https://github.com/llvm/llvm-project/pull/117415

My local build, on Debian GNU/Linux 12 (bookworm), complains
```
clang: error: GPU arch sm_20 is supported by CUDA versions between 7.0 and 8.0 
(inclusive), but installation at /usr/lib/cuda is 11.8; use '--cuda-path' to 
specify a different CUDA install, pass a different GPU arch with 
'--cuda-gpu-arch', or pass '--no-cuda-version-check'
```

Fix it by passing `--no-cuda-version-check`.

>From eb0bc0ba240f03c84e8bd6e829badd3df4ca2d20 Mon Sep 17 00:00:00 2001
From: Kai Luo <gluo...@gmail.com>
Date: Sat, 23 Nov 2024 13:14:27 +0800
Subject: [PATCH] [Driver] Pass `--no-cuda-version-check` to test

My local build, on Debian GNU/Linux 12 (bookworm), complains
```
clang: error: GPU arch sm_20 is supported by CUDA versions between 7.0 and 8.0 
(inclusive), but installation at /usr/lib/cuda is 11.8; use '--cuda-path' to 
specify a different CUDA install, pass a different GPU arch with 
'--cuda-gpu-arch', or pass '--no-cuda-version-check'
```

Fix it by passing `--no-cuda-version-check`.
---
 clang/test/Driver/cuda-no-threadsafe-statics.cu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/Driver/cuda-no-threadsafe-statics.cu 
b/clang/test/Driver/cuda-no-threadsafe-statics.cu
index eb15312f8f7d14..494f0e7a89ff32 100644
--- a/clang/test/Driver/cuda-no-threadsafe-statics.cu
+++ b/clang/test/Driver/cuda-no-threadsafe-statics.cu
@@ -2,7 +2,7 @@
 // compilation only.
 //
 // RUN: %clang -### -x cuda --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 
%s \
-// RUN:            -nocudainc -nocudalib 2>&1 | FileCheck %s
+// RUN:            -nocudainc -nocudalib --no-cuda-version-check 2>&1 | 
FileCheck %s
 
 // RUN: %clang -### -x hip --target=x86_64-linux-gnu -c 
--cuda-gpu-arch=gfx1010 %s \
 // RUN:            -nocudainc -nocudalib 2>&1 | FileCheck %s

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to