Skip to content

Commit be06751

Browse files
authored
[Driver][SYCL] Update tests and option availability (#17622)
Perform a few updates to clean up some LIT testing issues - Update `-nocudalib` to be available for Windows - Remove -forder-file-instrumentation usage (option removed) - Update arch= usage in testing with new offload model
1 parent 3cfd1de commit be06751

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5788,7 +5788,7 @@ def offloadlib : Flag<["--"], "offloadlib">,
57885788
def : Flag<["-"], "nogpulib">,
57895789
Alias<no_offloadlib>,
57905790
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;
5791-
def : Flag<["-"], "nocudalib">, Alias<no_offloadlib>;
5791+
def : Flag<["-"], "nocudalib">, Alias<no_offloadlib>, Visibility<[ClangOption, CLOption]>;
57925792
def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
57935793
HelpText<"Link the LLVM C Library for GPUs">;
57945794
def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>;

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ void SYCL::x86_64::BackendCompiler::ConstructJob(
16891689
// Unsupported options for SYCL device compilation.
16901690
// -fcf-protection, -fsanitize, -fprofile-generate, -fprofile-instr-generate
16911691
// -ftest-coverage, -fcoverage-mapping, -fcreate-profile, -fprofile-arcs
1692-
// -fcs-profile-generate -forder-file-instrumentation, --coverage
1692+
// -fcs-profile-generate, --coverage
16931693
static ArrayRef<options::ID> getUnsupportedOpts() {
16941694
static constexpr options::ID UnsupportedOpts[] = {
16951695
options::OPT_fsanitize_EQ, // -fsanitize

clang/test/Driver/sycl-ftarget-register-alloc-mode.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,23 @@
9898

9999
// AUTO_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch={{.*}},kind=sycl,compile-opts=-device_options [[DEVICE]] -ze-intel-enable-auto-large-GRF-mode{{.*}}"
100100

101-
// LARGE_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=,kind=sycl,compile-opts=-device_options pvc -ze-opt-large-register-file"
101+
// LARGE_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=generic,kind=sycl,compile-opts=-device_options pvc -ze-opt-large-register-file"
102102

103-
// SMALL_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=,kind=sycl,compile-opts=-device_options pvc -ze-intel-128-GRF-per-thread"
103+
// SMALL_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=generic,kind=sycl,compile-opts=-device_options pvc -ze-intel-128-GRF-per-thread"
104104

105105
// DEFAULT_AOT-NOT: -device_options
106106

107-
// MULTIPLE_ARGS_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=,kind=sycl,compile-opts=-device_options pvc -ze-intel-128-GRF-per-thread -device_options pvc -ze-opt-large-register-file"
107+
// MULTIPLE_ARGS_AOT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64_gen-unknown-unknown,arch=generic,kind=sycl,compile-opts=-device_options pvc -ze-intel-128-GRF-per-thread -device_options pvc -ze-opt-large-register-file"
108108

109109
// AUTO_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch={{.*}},kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-intel-enable-auto-large-GRF-mode"
110110

111-
// LARGE_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-opt-large-register-file"
111+
// LARGE_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=generic,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-opt-large-register-file"
112112

113-
// SMALL_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-intel-128-GRF-per-thread"
113+
// SMALL_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=generic,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-intel-128-GRF-per-thread"
114114

115115
// DEFAULT_JIT-NOT: -ftarget-register-alloc-mode=
116116

117-
// MULTIPLE_ARGS_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-intel-128-GRF-per-thread -ftarget-register-alloc-mode=pvc:-ze-opt-large-register-file"
117+
// MULTIPLE_ARGS_JIT: clang-offload-packager{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=generic,kind=sycl,compile-opts=-ftarget-register-alloc-mode=pvc:-ze-intel-128-GRF-per-thread -ftarget-register-alloc-mode=pvc:-ze-opt-large-register-file"
118118

119119
// BAD_DEVICE: unsupported argument 'dg2:auto' to option '-ftarget-register-alloc-mode='
120120
// BAD_MODE: unsupported argument 'pvc:superlarge' to option '-ftarget-register-alloc-mode='

clang/test/Driver/sycl-unsupported.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
// RUN: | FileCheck %s -DARCH=spir64 -DOPT=-fcs-profile-generate \
3232
// RUN: -DOPT_CC1=-fprofile-instrument=csllvm \
3333
// RUN: -check-prefixes=UNSUPPORTED_OPT_DIAG,UNSUPPORTED_OPT
34-
// RUN: %clangxx -fsycl -forder-file-instrumentation -### %s 2>&1 \
35-
// RUN: | FileCheck %s -DARCH=spir64 -DOPT=-forder-file-instrumentation
3634
// RUN: %clangxx -fsycl --coverage -### %s 2>&1 \
3735
// RUN: | FileCheck %s -DARCH=spir64 -DOPT=--coverage \
3836
// RUN: -DOPT_CC1=-coverage-notes-file \

0 commit comments

Comments
 (0)