Skip to content

Commit 33d6609

Browse files
committed
[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
1 parent e8b8f89 commit 33d6609

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

clang/test/Driver/openmp-offload-gpu.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,36 +154,36 @@
154154
/// Check that the runtime bitcode library is part of the compile line. Create a bogus
155155
/// bitcode library and add it to the LIBRARY_PATH.
156156
// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
157-
// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
157+
// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
158158
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
159159
// RUN: | FileCheck -check-prefix=CHK-BCLIB %s
160160
/// The user can override default detection using --libomptarget-nvptx-bc-path=.
161161
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
162162
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc \
163-
// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
163+
// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
164164
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
165165
// RUN: | FileCheck -check-prefix=CHK-BCLIB-USER %s
166166

167-
// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-cuda_80-sm_20.bc
167+
// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-cuda_80-sm_35.bc
168168
// CHK-BCLIB-USER: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-test.bc
169169
// CHK-BCLIB-NOT: {{error:|warning:}}
170170

171171
/// ###########################################################################
172172

173173
/// Check that the warning is thrown when the libomptarget bitcode library is not found.
174-
/// Libomptarget requires sm_35 or newer so an sm_20 bitcode library should never exist.
174+
/// Libomptarget requires sm_35 or newer so an sm_35 bitcode library should never exist.
175175
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
176-
// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
176+
// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
177177
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
178178
// RUN: | FileCheck -check-prefix=CHK-BCLIB-WARN %s
179179

180-
// 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.
180+
// 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.
181181

182182
/// ###########################################################################
183183

184184
/// Check that the error is thrown when the libomptarget bitcode library does not exist.
185185
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
186-
// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
186+
// RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
187187
// RUN: --libomptarget-nvptx-bc-path=not-exist.bc \
188188
// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
189189
// RUN: | FileCheck -check-prefix=CHK-BCLIB-ERROR %s

0 commit comments

Comments
 (0)