Skip to content

Commit 2ccc0fe

Browse files
authored
[SYCL] Add check for generated PDBs (intel#554)
1 parent a0c16e1 commit 2ccc0fe

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

SYCL/PDB/sycl.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// REQUIRES: windows,timelimit,(opencl||level_zero)
2+
// RUN: %clangxx -fsycl %s -o %t.out
3+
// RUN: %timelimit %t.out > %t.txt 2>&1 || true
4+
// RUN: cat %t.txt | FileCheck %s
5+
// CHECK: timelimit:{{.*}}sycl!{{.*}}sycl::detail::enqueueImpKernel{{.*}}
6+
// CHECK: timelimit:{{.*}}sycl!{{.*}}sycl::handler::finalize{{.*}}
7+
// CHECK: timelimit:{{.*}}sycl!{{.*}}sycl::detail::queue_impl::finalizeHandler{{.*}}
8+
// CHECK: timelimit:{{.*}}sycl!{{.*}}sycl::detail::queue_impl::submit_impl{{.*}}
9+
10+
#include <CL/sycl.hpp>
11+
12+
using namespace cl::sycl;
13+
14+
int main() {
15+
queue Q;
16+
// nd_range_error is generated due to 0-based local range.
17+
Q.submit([&](handler &CGH) {
18+
CGH.parallel_for_work_group<class f>(range<2>(5, 33), range<2>(1, 0),
19+
[=](group<2>) {});
20+
});
21+
return 0;
22+
}

SYCL/lit.cfg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,13 @@
384384
else:
385385
lit_config.warning("Couldn't find pre-installed AOT device compiler " + aot_tool)
386386

387+
# INTEL_CUSTOMIZATION
388+
if 'ICS_TESTDATA' in os.environ and platform.system() == "Windows":
389+
config.available_features.add('timelimit')
390+
# set _NT_SYMBOL_PATH to specify PDB files location
391+
config.substitutions.append(('%timelimit', ' env _NT_SYMBOL_PATH='+config.dpcpp_root_dir+'/bin '+os.environ['ICS_TESTDATA']+'/mainline/CT-SpecialTests/opencl/tools/win.x64/bin/timelimit.exe'))
392+
# end INTEL_CUSTOMIZATION
393+
387394
# Set timeout for test 1 min
388395
try:
389396
import psutil

config_sycl/pdb_sycl.info

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SYCL/PDB/sycl.cpp

llvm_test_suite_sycl.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ Sources repo https://github.com/intel-innersource/applications.compilers.tests.l
542542
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="matrix" testName="matrix_joint_matrix_uu_int8" />
543543
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="onlinecompiler" testName="onlinecompiler_online_compiler_l0" />
544544
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="onlinecompiler" testName="onlinecompiler_online_compiler_opencl" />
545+
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="pdb" testName="pdb_sycl" />
545546
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_enqueue_arg_order_buffer" />
546547
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_enqueue_arg_order_image" />
547548
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_interop_level_zero" />

llvm_test_suite_sycl_valgrind.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ Sources repo https://github.com/intel-innersource/applications.compilers.tests.l
542542
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="matrix" testName="matrix_joint_matrix_uu_int8" />
543543
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="onlinecompiler" testName="onlinecompiler_online_compiler_l0" />
544544
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="onlinecompiler" testName="onlinecompiler_online_compiler_opencl" />
545+
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="pdb" testName="pdb_sycl" />
545546
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_enqueue_arg_order_buffer" />
546547
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_enqueue_arg_order_image" />
547548
<test configFile="config_sycl/TEMPLATE_llvm_test_suite_sycl.xml" splitGroup="plugin" testName="plugin_interop_level_zero" />

0 commit comments

Comments
 (0)