-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Driver] Pass --cuda-path
to test
#117415
Conversation
@llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Kai Luo (bzEq) ChangesMy local build, on Debian GNU/Linux 12 (bookworm), complains
Fix it by passing Full diff: https://github.com/llvm/llvm-project/pull/117415.diff 1 Files Affected:
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
|
I am surprised that this is needed. I suspect clang picks the default CUDA version on your machine. While A better way to fix this may be to pass |
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`.
eb0bc0b
to
253a669
Compare
Address comment. |
--no-cuda-version-check
to test--cuda-path
to test
My local build, on Debian GNU/Linux 12 (bookworm), complains
Fix it by passing
--cuda-path
. Hope this doesn't affect the original intention of the test.