Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Run the LIT tests using the selected backend #1288

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sycl/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
print("Adding path to opencl-aot tool to PATH")
os.environ['PATH'] = os.path.pathsep.join((os.getenv('PATH'), config.sycl_tools_dir))

backend=lit_config.params.get('SYCL_BE', "PI_OPENCL")
backend = lit_config.params.get('SYCL_BE', "PI_OPENCL")
config.environment['SYCL_BE'] = backend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea!
Please remove gpu_run_on_linux_substitute += " SYCL_BE=PI_CUDA " below.

I have a similar but less elegant PR in the works that I will adapt to your change.


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

Expand Down Expand Up @@ -157,8 +158,6 @@ def getDeviceCount(device_type):
if platform.system() == "Linux":
gpu_run_on_linux_substitute = "env SYCL_DEVICE_TYPE=GPU "
gpu_check_on_linux_substitute = "| FileCheck %s"
if cuda:
gpu_run_on_linux_substitute += " SYCL_BE=PI_CUDA "

config.substitutions.append( ('%GPU_RUN_PLACEHOLDER', gpu_run_substitute) )
config.substitutions.append( ('%GPU_RUN_ON_LINUX_PLACEHOLDER', gpu_run_on_linux_substitute) )
Expand Down