Skip to content

[SYCL][Driver] Deduplicate libspirv logic #19131

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 4 commits into from
Jun 27, 2025

Conversation

Maetveis
Copy link
Contributor

@Maetveis Maetveis commented Jun 25, 2025

Based on PR #19130

Chain of upstream PRs & tree of downstream PRs as of 2025-06-25

Move the logic for finding and linking libspirv into SYCLInstallationDetector.
This code was basically duplicated between the CUDA and HIP toolchains,
and was also present in the Driver sources.
This is NFC, aside from the fact that the code in the HIP toolchain
lacked the special handling for the -### driver option present in the
other two places.

Copy link
Contributor

@mdtoguchi mdtoguchi left a comment

Choose a reason for hiding this comment

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

Nice cleanup! Just a small comment in the test update.

Copy link
Contributor

@frasercrmck frasercrmck left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up

@Maetveis Maetveis force-pushed the review/Maetveis/deduplicate-libspirv-logic branch from d04b05d to 830c773 Compare June 26, 2025 15:53
steffenlarsen pushed a commit that referenced this pull request Jun 27, 2025
)

<!-- start git-machete generated -->

# Based on PR #18956

## Tree of downstream PRs as of 2025-06-25

* **PR #19130 (THIS ONE)**

    * PR #19131

      * PR #19134

        * PR #19135

          * PR #19136

<!-- end git-machete generated -->

In the next commits I'd like to refactor and fix SYCL libspirv linking.
This adds a few tests to cover the current behavior. Some of it is
buggy, and not consistent between NVPTX and AMDGPU, it will be improved
in the next commits.
Maetveis added 2 commits June 27, 2025 00:34
Move the logic for finding and linking libspirv into SYCLInstallationDetector.
This code was basically duplicated between the CUDA and HIP toolchains,
and was also present in the Driver sources.
This is NFC, aside from the fact that the code in the HIP toolchain
lacked the special handling for the `-###` driver option present in the
other two places.
@Maetveis Maetveis force-pushed the review/Maetveis/deduplicate-libspirv-logic branch from d183788 to f08825e Compare June 27, 2025 07:37
@Maetveis Maetveis requested review from a team as code owners June 27, 2025 07:37
@Maetveis Maetveis requested review from konradkusiak97 and againull and removed request for a team June 27, 2025 07:37
@Maetveis Maetveis requested a review from omarahmed1111 June 27, 2025 07:37
@Maetveis Maetveis changed the base branch from review/Maetveis/improve-libspirv-linking-test-coverage to sycl June 27, 2025 07:37
@Maetveis Maetveis closed this Jun 27, 2025
@Maetveis Maetveis reopened this Jun 27, 2025
Maetveis added 2 commits June 27, 2025 01:27
Originally I changed the isOsWindows check to isWindowsMSVCEnvironment,
but neither of those is correct. The correct check is isOsWindows &&
!isWindowsCygwinEnvironment, because all known Windows environments
except Cygwin use 32-bit long.
I think we don't support SYCL on MinGW or Cygwin, but this is one less
bug to fix if we ever decide to.
@bader bader merged commit 7054619 into sycl Jun 27, 2025
25 checks passed
@bader bader deleted the review/Maetveis/deduplicate-libspirv-logic branch June 27, 2025 15:15
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.

5 participants