Skip to content

[SYCL][NativeCPU] Add libclc at compile time. #19346

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
Jul 9, 2025

Conversation

hvdijk
Copy link
Contributor

@hvdijk hvdijk commented Jul 8, 2025

This matches what is done for CUDA and HIP.

This matches what is done for CUDA and HIP.
@hvdijk hvdijk requested review from a team as code owners July 8, 2025 14:12
@hvdijk
Copy link
Contributor Author

hvdijk commented Jul 8, 2025

cc @intel/llvm-reviewers-cuda, comments welcome on that TODO comment for CUDA.

if (TC->getTriple().isNVPTX() || isNativeCPU) {
// For NVPTX we need to also link libclc at the same stage that we link
// all of the unbundled SYCL libdevice objects together.
// TODO: libspirv should have been linked in already by
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe @jchlanda also spotted this recently, iirc libdevice also uses some libclc symbols which is why it's getting linked again. With #18706 it might be possible to get rid of libdevice eventually, not sure if it's worth trying to figure out a better solution in the meantime.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, thanks, that makes sense. In that case, I will tweak the comment accordingly but not make any functional changes for CUDA. For Native CPU, we don't link in those other libdevice files anyway so we are not affected by that.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's right, at least for CUDA/HIP the main offenders seem to be the iteration space functions, see: https://github.com/intel/llvm/blob/sycl/libdevice/spirv_vars.h#L17

@hvdijk hvdijk temporarily deployed to WindowsCILock July 8, 2025 14:57 — with GitHub Actions Inactive
@hvdijk hvdijk temporarily deployed to WindowsCILock July 8, 2025 15:44 — with GitHub Actions Inactive
@hvdijk hvdijk temporarily deployed to WindowsCILock July 8, 2025 15:44 — with GitHub Actions Inactive
@hvdijk
Copy link
Contributor Author

hvdijk commented Jul 9, 2025

@intel/llvm-gatekeepers This can be merged, thanks.

@ldrumm ldrumm merged commit 0386b1d into intel:sycl Jul 9, 2025
24 checks passed
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.

6 participants