Skip to content

Commit e0de9af

Browse files
authored
[SYCL] Fix tests (intel#82)
* remove duplicated files; * mark test unsupported if it requires level_zero headers and the headers are not availble.
1 parent 1504a07 commit e0de9af

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SYCL/lit.cfg.py

+8
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@
101101
cl_options=True
102102
config.available_features.add('cl_options')
103103

104+
check_l0_file='l0_include.cpp'
105+
with open(check_l0_file, 'w') as fp:
106+
fp.write("#include<level_zero/ze_api.h>")
107+
108+
sp = subprocess.getstatusoutput(config.dpcpp_compiler+' -fsycl -c '+check_l0_file)
109+
if sp[0] == 0:
110+
config.available_features.add('level_zero_headers')
111+
104112
if config.opencl_libs_dir:
105113
if cl_options:
106114
config.substitutions.append( ('%opencl_lib', ' '+config.opencl_libs_dir+'/OpenCL.lib') )

0 commit comments

Comments
 (0)