Skip to content

[libspirv] Implement SPIR-V vload builtins via CLC #19174

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
Jun 30, 2025

Conversation

frasercrmck
Copy link
Contributor

No change to any target's generated bytecode.

No change to any target's generated bytecode.
@frasercrmck frasercrmck requested a review from wenju-he June 26, 2025 14:38
@frasercrmck frasercrmck requested a review from a team as a code owner June 26, 2025 14:38
@frasercrmck frasercrmck added the libclc libclc project related issues label Jun 26, 2025
@frasercrmck frasercrmck requested a review from ldrumm June 26, 2025 14:38
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

#define VLOAD_DEF(ADDRSPACE) \
_CLC_OVERLOAD _CLC_DEF CLC_VLOAD_TY SPIRV_VLOAD_NAME()( \
size_t offset, const ADDRSPACE __CLC_SCALAR_GENTYPE *x) { \
return *((const ADDRSPACE CLC_VLOAD_TY *)(&x[offset])); \
Copy link
Contributor

Choose a reason for hiding this comment

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

OpenCL spec doesn't define scalar variant of vloadn, right? Can we delete it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right, it's not defined. I'm not sure whether they can be removed - we'd first have to see if these builtins are actually being relied upon by the host/runtime. I can investigate that as a follow-up.

@frasercrmck
Copy link
Contributor Author

@intel/llvm-gatekeepers this is ready to merge, thanks.

@martygrant martygrant merged commit b5871ee into intel:sycl Jun 30, 2025
25 checks passed
@frasercrmck frasercrmck deleted the vload-builtins branch June 30, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libclc libclc project related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants