Skip to content

[SYCL] Always generate specialization constants buffer #4591

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 2 commits into from
Nov 30, 2021

Conversation

AGindinson
Copy link
Contributor

@AGindinson AGindinson commented Sep 17, 2021

The discrepancy of kernel signatures between SPIR-V images (for which
SYCL2020 spec constants are supported natively) and AOT-compiled
images (which actually require the buffer to emulate SYCL2020 spec
constants) has blocked the multi-target compilation & execution when
the feature is used. Since the integration header was common for both
targets, RT attempted to set the specialization constants buffer argument
for the native target.

Align the kernel signatures by generating a (nullified) buffer for the SPIR-V
target as well and make sure it is handled correctly by the DPC++ RT.

Tested in intel/llvm-test-suite#584.

Signed-off-by: Artem Gindinson [email protected]

The discrepancy of kernel signatures between SPIR-V images (for which
SYCL2020 spec constants are supported natively) and AOT-compiled
images (which actually require the buffer to emulate SYCL2020 spec
constants) has blocked the multi-target compilation & execution when
the feature is used. Align the kernel signatures by generating a
(nullified) buffer for the SPIR-V target as well and make sure it is
handled correctly by the DPC++ RT.

Signed-off-by: Artem Gindinson <[email protected]>
@AGindinson
Copy link
Contributor Author

/verify with intel/llvm-test-suite#584

@AGindinson
Copy link
Contributor Author

/verify with intel/llvm-test-suite#584

@AGindinson
Copy link
Contributor Author

CUDA reduction failures are the known unrelated ones.

@AGindinson AGindinson requested a review from a team November 29, 2021 16:44
Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

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

So the only difference in how kernel_handler argument is now handled for native vs non-native support is in how it is initialized - i.e. the former uses default initialization while latter results in call to __init. Did I get that right?

@AGindinson
Copy link
Contributor Author

So the only difference in how kernel_handler argument is now handled for native vs non-native support is in how it is initialized - i.e. the former uses default initialization while latter results in call to __init. Did I get that right?

This is what I've attempted, yes. Since the RT adjustments allow to handle the default-initialized (null) buffer, I've thought this would be sufficient on the FE part.

@premanandrao
Copy link
Contributor

So the only difference in how kernel_handler argument is now handled for native vs non-native support is in how it is initialized - i.e. the former uses default initialization while latter results in call to __init. Did I get that right?

Thanks for asking this @elizabethandrews, it helped. :-)

@bader bader merged commit f82ddf4 into intel:sycl Nov 30, 2021
@AGindinson AGindinson deleted the spec-const-buffer branch January 1, 2023 12:12
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