Skip to content

[SYCL] Bring back RTC support for AMD and Nvidia GPU targets #19342

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

Open
wants to merge 12 commits into
base: sycl
Choose a base branch
from

Conversation

jopperm
Copy link
Contributor

@jopperm jopperm commented Jul 8, 2025

This PR brings back #18918 and #19302, and fixes the issue with shared library builds.

The problem was that we accessed hidden symbols defined in headers from the clang/lib directory to obtain paths to the vendor-specific device library files. We now use the ToolChain::getDeviceLibs API, and supply a minimal implementation for the CudaToolchain.

@jopperm jopperm temporarily deployed to WindowsCILock July 8, 2025 11:53 — with GitHub Actions Inactive
@jopperm jopperm temporarily deployed to WindowsCILock July 8, 2025 12:21 — with GitHub Actions Inactive
@jopperm jopperm temporarily deployed to WindowsCILock July 8, 2025 12:21 — with GitHub Actions Inactive
Signed-off-by: Julian Oppermann <[email protected]>
jopperm added 3 commits July 11, 2025 16:23
Signed-off-by: Julian Oppermann <[email protected]>
Signed-off-by: Julian Oppermann <[email protected]>
@jopperm jopperm temporarily deployed to WindowsCILock July 14, 2025 07:24 — with GitHub Actions Inactive
@jopperm jopperm marked this pull request as ready for review July 14, 2025 07:46
@jopperm jopperm requested review from a team as code owners July 14, 2025 07:46
@jopperm jopperm changed the title [SYCL] Bring back RTC support for GPU targets [SYCL] Bring back RTC support for AMD and Nvidia GPU targets Jul 14, 2025
Comment on lines +669 to +670
SmallVector<ToolChain::BitCodeLibraryInfo, 12> CommonDeviceLibs =
OffloadTC->getDeviceLibs(CPUArgList, Action::OffloadKind::OFK_SYCL);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note to reviewers: This (and the setup of the clang::Driver instance above) is the new bit in this PR. We cannot use CudaToolChain and ROCMToolChain directly because they are marked as hidden symbols.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Apart from me being a pedantic nuisance, LGTM!

Signed-off-by: Julian Oppermann <[email protected]>
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