Skip to content

[SYCL][E2E] Fix SDK detection on Windows #17792

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

Merged
merged 2 commits into from
Apr 2, 2025
Merged
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
18 changes: 12 additions & 6 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,12 @@ def check_igc_tag_and_add_feature():
if "igc-dev" in contents:
config.available_features.add("igc-dev")


def quote_path(path):
if platform.system() == "Windows":
return f'"{path}"'
return shlex.quote(path)

# Call the function to perform the check and add the feature
check_igc_tag_and_add_feature()

Expand Down Expand Up @@ -305,10 +311,10 @@ def open_check_file(file_name):
file=fp,
)

config.level_zero_libs_dir = shlex.quote(
config.level_zero_libs_dir = quote_path(
lit_config.params.get("level_zero_libs_dir", config.level_zero_libs_dir)
)
config.level_zero_include = shlex.quote(
config.level_zero_include = quote_path(
lit_config.params.get(
"level_zero_include",
(
Expand Down Expand Up @@ -416,10 +422,10 @@ def open_check_file(file_name):
file=fp,
)

config.cuda_libs_dir = shlex.quote(
config.cuda_libs_dir = quote_path(
lit_config.params.get("cuda_libs_dir", config.cuda_libs_dir)
)
config.cuda_include = shlex.quote(
config.cuda_include = quote_path(
lit_config.params.get(
"cuda_include",
(config.cuda_include if config.cuda_include else config.sycl_include),
Expand Down Expand Up @@ -465,10 +471,10 @@ def open_check_file(file_name):
),
file=fp,
)
config.hip_libs_dir = shlex.quote(
config.hip_libs_dir = quote_path(
lit_config.params.get("hip_libs_dir", config.hip_libs_dir)
)
config.hip_include = shlex.quote(
config.hip_include = quote_path(
lit_config.params.get(
"hip_include",
(config.hip_include if config.hip_include else config.sycl_include),
Expand Down
Loading