-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL RT] Add support for composite specialization constants #2797
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
[SYCL RT] Add support for composite specialization constants #2797
Conversation
@kbobrovs, @smaslov-intel, please review this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you going to fix the style check failure?
sycl/include/CL/sycl/detail/pi.hpp
Outdated
/// this binary image. For each property pointed to by an iterator within the | ||
/// range, the name of the property is the specializaion constant symbolic ID | ||
/// and the value is a list of tuples of 32-bit unsigned integer values, which | ||
/// encode scalar specialization constants, that form a composite one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// encode scalar specialization constants, that form a composite one. | |
/// encode scalar specialization constants, that form the composite one. |
What if it is a nested structural type? Can you maybe give an example here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole structure will be flattened. Sure, I will add an example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed and added an example in 0800c2bc8278c364eeee5951d0be180df228dcef
Sure, applied it in 0800c2bc8278c364eeee5951d0be180df228dcef. I was just waiting for some review comments to bundle clang-format change together with them to avoid wasting CI run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo aside, LGTM
Added an example of composite constant descriptor. Fixed a few typos. Applied clang-format
Added a padding field to device representation of spec_constant class in order to align its size with size of it on host. If sizes are not the same it could lead to memory corruptions in SYCL RT when it tries to access arguments of SYCL Kernel function.
Moved them into on-device directory as they are E2E tests required low-level runtimes and HW. Added one more test for composite spec constants.
a37e679
to
c8b42fd
Compare
Enabled E2E tests as we have the rest of functionality in the repo already. Fixed an issue I found with different size of |
@kbobrovs, please take a look as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New fix in spec_constant.hpp LGTM
@sergey-semenov, @smaslov-intel, please take a look at the update version |
This PR implements runtime support for composite specialization constants. The test is disabled at the moment, because we need to merge #2779 first + enable SPIR-V support for composite spec constants