Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 241c753

Browse files
committed
Merge remote-tracking branch 'intel_llvm/intel' into esimd_acc_gather_scatter_rgba
2 parents b3f3317 + 46a229e commit 241c753

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

SYCL/Config/kernel_from_file.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
// FIXME Disabled fallback assert as it'll require either online linking or
55
// explicit offline linking step here
66
// FIXME separate compilation requires -fno-sycl-dead-args-optimization
7-
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fno-sycl-use-bitcode -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
7+
// As we are doing a separate device compilation here, we need to explicitly
8+
// add the device lib instrumentation (itt_compiler_wrapper)
9+
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fsycl-use-bitcode -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h -c %s -o %t.bc -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
10+
// >> ---- unbundle compiler wrapper device object
11+
// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=%t_compiler_wrappers.bc -unbundle
12+
// >> ---- link device code
13+
// RUN: llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc
14+
// >> ---- translate to SPIR-V
15+
// RUN: llvm-spirv -o %t.spv %t_app.bc
816
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -fno-sycl-dead-args-optimization -Xclang -verify-ignore-unexpected=note,warning
917
// RUN: %BE_RUN_PLACEHOLDER env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
1018
// CHECK: Passed

SYCL/SeparateCompile/test.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@
2525
// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=a.o -output=a_kernel.bc -input=a_fat.o -unbundle
2626
// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=b.o -output=b_kernel.bc -input=b_fat.o -unbundle
2727
//
28+
// As we are doing a separate device compilation here, we need to explicitly
29+
// add the device lib instrumentation (itt_compiler_wrapper)
30+
// >> ---- unbundle compiler wrapper device object
31+
// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=compiler_wrappers.bc -unbundle
32+
//
2833
// >> ---- link device code
29-
// RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc
34+
// RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc compiler_wrappers.bc
3035
//
3136
// >> convert linked .bc to spirv
3237
// RUN: llvm-spirv -o=app.spv app.bc

SYCL/lit.cfg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292
llvm_config.with_environment(var,"")
9393

9494
config.substitutions.append( ('%sycl_libs_dir', config.sycl_libs_dir ) )
95+
if platform.system() == "Windows":
96+
config.substitutions.append( ('%sycl_static_libs_dir', config.sycl_libs_dir + '/../lib' ) )
97+
elif platform.system() == "Linux":
98+
config.substitutions.append( ('%sycl_static_libs_dir', config.sycl_libs_dir ) )
9599
config.substitutions.append( ('%sycl_include', config.sycl_include ) )
96100

97101
if lit_config.params.get('gpu-intel-dg1', False):
@@ -155,6 +159,7 @@
155159
config.substitutions.append( ('%cxx_std_option', '/std:' ) )
156160
config.substitutions.append( ('%fPIC', '') )
157161
config.substitutions.append( ('%shared_lib', '/LD') )
162+
config.substitutions.append( ('%obj_ext', '.obj') )
158163
else:
159164
config.substitutions.append( ('%sycl_options', ' -lsycl -I' +
160165
config.sycl_include + ' -I' + os.path.join(config.sycl_include, 'sycl') +
@@ -168,6 +173,7 @@
168173
# configurations
169174
config.substitutions.append( ('%fPIC', ('' if platform.system() == 'Windows' else '-fPIC')) )
170175
config.substitutions.append( ('%shared_lib', '-shared') )
176+
config.substitutions.append( ('%obj_ext', '.o') )
171177

172178
if not config.gpu_aot_target_opts:
173179
config.gpu_aot_target_opts = '"-device *"'

0 commit comments

Comments
 (0)