[clang] [CUDA] Correctly set CUDA default architecture (PR #84017)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 05:46:43 PST 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/84017
Summary:
We already had a special CUDA default that better tracked the state as
of modern CUDA installations. Recently this was bumped up to `sm_52`,
but there was a location that wasn't respecting this. Fix that.
>From e4c58b869c2534f58e0b433a73b42a507477c694 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Tue, 5 Mar 2024 07:44:48 -0600
Subject: [PATCH] [CUDA] Correctly set CUDA default architecture
Summary:
We already had a special CUDA default that better tracked the state as
of modern CUDA installations. Recently this was bumped up to `sm_52`,
but there was a location that wasn't respecting this. Fix that.
---
clang/lib/Driver/Driver.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index de8ceb2f0898bb..cecd34acbc92c0 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -3234,7 +3234,7 @@ class OffloadingActionBuilder final {
CudaActionBuilder(Compilation &C, DerivedArgList &Args,
const Driver::InputList &Inputs)
: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) {
- DefaultCudaArch = CudaArch::SM_35;
+ DefaultCudaArch = CudaArch::CudaDefault;
}
StringRef getCanonicalOffloadArch(StringRef ArchStr) override {
More information about the cfe-commits
mailing list