[clang] 33d6609 - [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35
Shilei Tian via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 20 12:14:17 PST 2021
Author: Shilei Tian
Date: 2021-02-20T15:14:13-05:00
New Revision: 33d660939d9acb027f9941f037802936124dad8c
URL: https://github.com/llvm/llvm-project/commit/33d660939d9acb027f9941f037802936124dad8c
DIFF: https://github.com/llvm/llvm-project/commit/33d660939d9acb027f9941f037802936124dad8c.diff
LOG: [Clang][OpenMP] Update driver test case for OpenMP offload to use sm_35
`sm_35` is the minimum requirement for OpenMP offloading on NVPTX device.
Current driver test case is using `sm_20`. D97003 is going to switch the minimum
CUDA version to 9.2, which only supports `sm_30+`. This patch makes step for the
change.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D97120
Added:
clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_35.bc
Modified:
clang/test/Driver/openmp-offload-gpu.c
Removed:
clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_20.bc
################################################################################
diff --git a/clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_20.bc b/clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_35.bc
similarity index 100%
rename from clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_20.bc
rename to clang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_35.bc
diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c
index a2ffd83b9cb8..796b094f97ea 100644
--- a/clang/test/Driver/openmp-offload-gpu.c
+++ b/clang/test/Driver/openmp-offload-gpu.c
@@ -154,36 +154,36 @@
/// Check that the runtime bitcode library is part of the compile line. Create a bogus
/// bitcode library and add it to the LIBRARY_PATH.
// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-BCLIB %s
/// The user can override default detection using --libomptarget-nvptx-bc-path=.
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc \
-// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-BCLIB-USER %s
-// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-cuda_80-sm_20.bc
+// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-cuda_80-sm_35.bc
// CHK-BCLIB-USER: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-test.bc
// CHK-BCLIB-NOT: {{error:|warning:}}
/// ###########################################################################
/// Check that the warning is thrown when the libomptarget bitcode library is not found.
-/// Libomptarget requires sm_35 or newer so an sm_20 bitcode library should never exist.
+/// Libomptarget requires sm_35 or newer so an sm_35 bitcode library should never exist.
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-BCLIB-WARN %s
-// CHK-BCLIB-WARN: No library 'libomptarget-nvptx-cuda_80-sm_20.bc' found in the default clang lib directory or in LIBRARY_PATH. Please use --libomptarget-nvptx-bc-path to specify nvptx bitcode library.
+// CHK-BCLIB-WARN: No library 'libomptarget-nvptx-cuda_80-sm_35.bc' found in the default clang lib directory or in LIBRARY_PATH. Please use --libomptarget-nvptx-bc-path to specify nvptx bitcode library.
/// ###########################################################################
/// Check that the error is thrown when the libomptarget bitcode library does not exist.
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
-// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
+// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
// RUN: --libomptarget-nvptx-bc-path=not-exist.bc \
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-BCLIB-ERROR %s
More information about the cfe-commits
mailing list