Skip to content

[SYCL][E2E] Added function to link libraries over Windows UNC network paths#22172

Open
travisle2 wants to merge 4 commits into
intel:syclfrom
travisle2:Windows_UNC_Network
Open

[SYCL][E2E] Added function to link libraries over Windows UNC network paths#22172
travisle2 wants to merge 4 commits into
intel:syclfrom
travisle2:Windows_UNC_Network

Conversation

@travisle2
Copy link
Copy Markdown
Contributor

This pull request enables the functionality for libraries to be linked from Windows UNC Network Paths. This is only applied to the OpenCL Library at the moment.

@travisle2 travisle2 requested a review from a team as a code owner May 29, 2026 19:21
@travisle2 travisle2 requested a review from uditagarwal97 May 29, 2026 19:21
Copy link
Copy Markdown

@omirochn omirochn left a comment

Choose a reason for hiding this comment

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

Would not the suggestions be clearer?

Comment thread sycl/test-e2e/lit.cfg.py Outdated

# Check for OpenCL ICD
if config.opencl_libs_dir:
tmp_opencl_libs_dir = config.opencl_libs_dir
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
tmp_opencl_libs_dir = config.opencl_libs_dir
opencl_lib = config.opencl_libs_dir + "/OpenCL.lib"

Comment thread sycl/test-e2e/lit.cfg.py Outdated
Comment on lines +573 to +581
if is_windows_unc_network_path(tmp_opencl_libs_dir):
tmp_opencl_libs_dir = quote_path(normalize_windows_network_path(tmp_opencl_libs_dir) + "\\\\OpenCL.lib")
config.substitutions.append(
("%opencl_lib", " " + tmp_opencl_libs_dir)
)
else:
config.substitutions.append(
("%opencl_lib", " " + config.opencl_libs_dir + "/OpenCL.lib")
)
Copy link
Copy Markdown

@omirochn omirochn May 29, 2026

Choose a reason for hiding this comment

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

Suggested change
if is_windows_unc_network_path(tmp_opencl_libs_dir):
tmp_opencl_libs_dir = quote_path(normalize_windows_network_path(tmp_opencl_libs_dir) + "\\\\OpenCL.lib")
config.substitutions.append(
("%opencl_lib", " " + tmp_opencl_libs_dir)
)
else:
config.substitutions.append(
("%opencl_lib", " " + config.opencl_libs_dir + "/OpenCL.lib")
)
if is_windows_unc_network_path(opencl_lib):
opencl_lib = normalize_windows_network_path(opencl_lib)
config.substitutions.append(
("%opencl_lib", " " + quote_path(opencl_lib)
)

@travisle2
Copy link
Copy Markdown
Contributor Author

Implemented suggestions.

@dm-vodopyanov
Copy link
Copy Markdown
Contributor

@travisle2 could you please add tags [SYCL][E2E] to the PR title?

https://github.com/intel/llvm/blob/sycl/sycl/doc/developer/ContributeToDPCPP.md#commit-message

@travisle2 travisle2 changed the title Added function to link libraries over Windows UNC network paths [SYCL][E2E] Added function to link libraries over Windows UNC network paths Jun 1, 2026
@sarnex
Copy link
Copy Markdown
Contributor

sarnex commented Jun 1, 2026

Can you please apply the code formatting suggestions?

https://github.com/intel/llvm/actions/runs/26664719791/job/78872276567?pr=22172

Comment thread sycl/test-e2e/lit.cfg.py
config.substitutions.append(
("%opencl_lib", " " + config.opencl_libs_dir + "/OpenCL.lib")
)
if is_windows_unc_network_path(opencl_lib):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should do the same for the other libs, see lines 384, 493, and 547

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will change the format for the last opencl_lib; however, changing the other lines (384, 493, and 547) to be on a single line may make the code less readable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ideally we would have the code readable in all places we're changing

Copy link
Copy Markdown
Contributor Author

@travisle2 travisle2 Jun 1, 2026

Choose a reason for hiding this comment

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

For example:
I am not sure if it would be fine to change the below.

level_zero_options = (
        " "
        + (
            config.level_zero_libs_dir + "/ze_loader.lib "
            if config.level_zero_libs_dir
            else "ze_loader.lib"
        )
        + " /I"
        + config.level_zero_include
    )

To the following here.

level_zero_options = (" " + (config.level_zero_libs_dir + "/ze_loader.lib " if config.level_zero_libs_dir else "ze_loader.lib") + " /I" + config.level_zero_include)

Copy link
Copy Markdown
Contributor

@sarnex sarnex Jun 1, 2026

Choose a reason for hiding this comment

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

sorry i may be missing it but is the only difference between those two supposed to be the whitespace? i meant we should fix those other callsites to work with network paths by calling normalize_windows_network_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants