Skip to content

[SYCL] Add CUID to mangled names of TU-local kernels - #23868

Draft
ianayl wants to merge 3 commits into
intel:syclfrom
ianayl:internal-linkage-use-cuid
Draft

ianayl wants to merge 3 commits into
intel:syclfrom
ianayl:internal-linkage-use-cuid

Conversation

@ianayl

@ianayl ianayl commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds compilation unit IDs (CUID) to mangled TU-local kernel names, which are only guaranteed to be unique within its own TU, but not necessarily across the program. The CUID comes from already-merged driver changes in #23820.

This is necessary since without distinguishing TUs, TU-local kernels that end up with the same mangled name get silently merged at device link time.

Outstanding tasks:

  • Changing free-function kernels to adopt this behavior belongs in its own PR.
  • This PR doesn't change what's done in [[clang::sycl_kernel_entry_point(KernelName)]], i.e. what is used in upstream clang. That needs to be a separate upstream PR.

@ianayl

ianayl commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

@elizabethandrews @tahonermann Sorry this PR took longer to come out than expected, this PR is ready for review.

This branch has not been deployed

No deployments
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.

1 participant