Skip to content

Conversation

@npmiller
Copy link
Contributor

@npmiller npmiller commented May 9, 2022

This entry point is only meant to be called when native specialization
constants are supported, so AOT only targets don't support it.

Still implement it in the AOT only plugins to have clearer error if it's
accidentally called.

This is mentioned in #6093, although it doesn't touch the alignment issue.

This entry point is only meant to be called when native specialization
constants are supported, so AOT only targets don't support it.

Still implement it in the AOT only plugins to have clearer error if it's
accidentally called.
@smaslov-intel
Copy link
Contributor

Please add a comment to function definition that it is only supported for SPIR-V programs.

piextProgramSetSpecializationConstant(pi_program prog, pi_uint32 spec_id,

@bader bader merged commit d149ec3 into intel:sycl May 14, 2022
pvchupin pushed a commit that referenced this pull request May 19, 2022
This patch solves #6093, and finishes to fix #5911

It doesn't change anything for native specialization constants, but correctly aligns emulated specialization constants based on type requirements.

Emulated specialization constant don't use the CompositeOffset mechanism, so this patch re-uses this field to communicate the necessary padding from the compiler pass in sycl-post-link to the runtime to ensure correct alignment.

With this patch the SYCL-CTS specialization constant tests are all passing with the CUDA plugin:

% ./bin/test_specialization_constants  
=======================
All tests passed (56 assertions in 46 test cases)

Note this is on top of #6125
yinyangsx pushed a commit to yinyangsx/llvm that referenced this pull request May 25, 2022
This patch solves intel#6093, and finishes to fix intel#5911

It doesn't change anything for native specialization constants, but correctly aligns emulated specialization constants based on type requirements.

Emulated specialization constant don't use the CompositeOffset mechanism, so this patch re-uses this field to communicate the necessary padding from the compiler pass in sycl-post-link to the runtime to ensure correct alignment.

With this patch the SYCL-CTS specialization constant tests are all passing with the CUDA plugin:

% ./bin/test_specialization_constants  
=======================
All tests passed (56 assertions in 46 test cases)

Note this is on top of intel#6125
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.

3 participants