Skip to content

[libspirv] Restore overloads of generic address space #17214

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 1 commit into from
Feb 27, 2025

Conversation

frasercrmck
Copy link
Contributor

This adds some missing generic address space overloads of CLC functions: frexp, and whichever functions make use of the
unary_def_with_(int_)?ptr.inc files.

Note that this commit doesn't map the equivalent SPIR-V functions to these CLC implementations. This is because the generic SPIR-V implementation of FP16 types currently use the clang builtins as opposed to the software implementations. As discussed in #17163, this is not the proper behaviour for generic implementations, as not all targets support the builtins. In future work we will need to either provide target-specific overrides for the builtin implementations, or provide an easy mechanism by which the CLC implementations can select between builtins or software implementations automatically.

This adds some missing generic address space overloads of CLC functions:
frexp, and whichever functions make use of the
unary_def_with_(int_)?ptr.inc files.

Note that this commit doesn't map the equivalent SPIR-V functions to
these CLC implementations. This is because the generic SPIR-V
implementation of FP16 types currently use the clang builtins as opposed
to the software implementations. As discussed in intel#17163, this is not the
proper behaviour for generic implementations, as not all targets support
the builtins. In future work we will need to either provide
target-specific overrides for the builtin implementations, or provide an
easy mechanism by which the CLC implementations can select between
builtins or software implementations automatically.
@frasercrmck frasercrmck requested a review from a team as a code owner February 27, 2025 09:24
@frasercrmck frasercrmck requested review from omarahmed1111 and removed request for a team February 27, 2025 09:24
@Maetveis Maetveis requested a review from wenju-he February 27, 2025 12:49
Copy link
Contributor

@wenju-he wenju-he left a comment

Choose a reason for hiding this comment

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

LGTM

@jsji jsji merged commit 06490c6 into intel:sycl-web Feb 27, 2025
1 check passed
@frasercrmck frasercrmck deleted the libspirv-generic-addrspace branch February 27, 2025 14:48
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