https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/100607
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. >From 1156979b150f9ae778cf28adb7adcb812c1ceffb Mon Sep 17 00:00:00 2001 From: Joseph Huber <hube...@outlook.com> Date: Thu, 25 Jul 2024 12:31:09 -0500 Subject: [PATCH] [NVPTX] Correctly forward the PTX feature to the nvlink wrapper 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. --- clang/test/Driver/cuda-cross-compiling.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits