[clang] [Driver] Pass `--no-cuda-version-check` to test (PR #117415)
Kai Luo via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 25 15:47:08 PST 2024
https://github.com/bzEq updated https://github.com/llvm/llvm-project/pull/117415
>From f4e8c55a4dbe9092bcf5f61cca67359a779861bc Mon Sep 17 00:00:00 2001
From: Kai Luo <gluokai at gmail.com>
Date: Sat, 23 Nov 2024 13:14:27 +0800
Subject: [PATCH 1/2] [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
>From 253a66970087da8d6c66cad3a64959273039aad2 Mon Sep 17 00:00:00 2001
From: Kai Luo <gluokai at gmail.com>
Date: Tue, 26 Nov 2024 07:46:42 +0800
Subject: [PATCH 2/2] Address comment
---
clang/test/Driver/cuda-no-threadsafe-statics.cu | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/test/Driver/cuda-no-threadsafe-statics.cu b/clang/test/Driver/cuda-no-threadsafe-statics.cu
index 494f0e7a89ff32..8730605f18828e 100644
--- a/clang/test/Driver/cuda-no-threadsafe-statics.cu
+++ b/clang/test/Driver/cuda-no-threadsafe-statics.cu
@@ -2,7 +2,8 @@
// compilation only.
//
// RUN: %clang -### -x cuda --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 %s \
-// RUN: -nocudainc -nocudalib --no-cuda-version-check 2>&1 | FileCheck %s
+// RUN: -nocudainc -nocudalib --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: 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
More information about the cfe-commits
mailing list