[clang] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper (PR #100607)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 25 10:33:10 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Joseph Huber (jhuber6)
<details>
<summary>Changes</summary>
Summary:
This is necessary for LTO when the user specifies it or has a CUDA
version that supports a sufficiently high version. Previously it would
default.
Fixes https://github.com/llvm/llvm-project/issues/100606
---
Full diff: https://github.com/llvm/llvm-project/pull/100607.diff
1 Files Affected:
- (modified) clang/test/Driver/cuda-cross-compiling.c (+8)
``````````diff
diff --git a/clang/test/Driver/cuda-cross-compiling.c b/clang/test/Driver/cuda-cross-compiling.c
index 42d56cbfcc321..c2e538c25329e 100644
--- a/clang/test/Driver/cuda-cross-compiling.c
+++ b/clang/test/Driver/cuda-cross-compiling.c
@@ -90,3 +90,11 @@
// RUN: | FileCheck -check-prefix=GENERIC %s
// GENERIC-NOT: -cc1" "-triple" "nvptx64-nvidia-cuda" {{.*}} "-target-cpu"
+
+//
+// Test forwarding the necessary +ptx feature.
+//
+// RUN: %clang -target nvptx64-nvidia-cuda --cuda-feature=+ptx63 -march=sm_52 -### %s 2>&1 \
+// RUN: | FileCheck -check-prefix=FEATURE %s
+
+// FEATURE: clang-nvlink-wrapper{{.*}}"--feature" "+ptx63"
``````````
</details>
https://github.com/llvm/llvm-project/pull/100607
More information about the cfe-commits
mailing list