Skip to content

Commit 7b81e22

Browse files
committed
[SYCL] Run the LIT tests using the selected backend (intel#1288)
2 parents 50d5520 + f856948 commit 7b81e22

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sycl/test/lit.cfg.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
print("Adding path to opencl-aot tool to PATH")
8989
os.environ['PATH'] = os.path.pathsep.join((os.getenv('PATH'), config.sycl_tools_dir))
9090

91-
backend=lit_config.params.get('SYCL_BE', "PI_OPENCL")
91+
backend = lit_config.params.get('SYCL_BE', "PI_OPENCL")
92+
config.environment['SYCL_BE'] = backend
9293

9394
get_device_count_by_type_path = os.path.join(config.llvm_tools_dir, "get_device_count_by_type")
9495

@@ -159,8 +160,6 @@ def getDeviceCount(device_type):
159160
if platform.system() == "Linux":
160161
gpu_run_on_linux_substitute = "env SYCL_DEVICE_TYPE=GPU "
161162
gpu_check_on_linux_substitute = "| FileCheck %s"
162-
if cuda:
163-
gpu_run_on_linux_substitute += " SYCL_BE=PI_CUDA "
164163

165164
config.substitutions.append( ('%GPU_RUN_PLACEHOLDER', gpu_run_substitute) )
166165
config.substitutions.append( ('%GPU_RUN_ON_LINUX_PLACEHOLDER', gpu_run_on_linux_substitute) )

0 commit comments

Comments
 (0)