Skip to content

[sycl-post-link] Handle spec constants after device code split #3748

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

Conversation

AlexeySachkov
Copy link
Contributor

@AlexeySachkov AlexeySachkov commented May 13, 2021

Due to changes in SpecConstantsPass introduced by #3513,
device image properties for specialization constants are now computed in
a bit different way: in particular they are calculated based on metadata
generated by the pass and not by looking at the SPIR-V friendly IR
intrinsics left in the module.

Such change caused a regression: if device code split was used together
with specialization constants, each resulting device image was supplied
with list of all specialization constants found in the original
undivided module. In combination with some DPC++ RT changes it lead to
setting non-existing specialization constants.

This patch fixed the regression by performing device code split step
before handling specialization constants.

Due to changes in `SpecConstatsPass` introduced by intel#3513,
device image properties for specialization constants are now computed in
a bit different way: in particular they are calculated based on metadata
generated by the pass and not by looking at the SPIR-V friendly IR
intrinsics left in the module.

Such change caused a regression: if device code split was used together
with specialization constants, each resulting device image was supplied
with list of *all* specialization constants found in the _original_
undivided module. In combination with some DPC++ RT changes it lead to
setting non-existing specialization constants.

This patch fixed the regression by performing device code split step
*before* handling specialization constants.
@mlychkov
Copy link
Contributor

There is also a typo in commit description: SpecConstatsPass -> SpecConstantsPass .

@AlexeySachkov
Copy link
Contributor Author

There is also a typo in commit description: SpecConstatsPass -> SpecConstantsPass .

Thanks, updated description

@AlexeySachkov
Copy link
Contributor Author

Failures in Jenkins/Precommit turned out to be a known sporadic failures, I've submitted intel/llvm-test-suite#282 to temporary disable those test while failures are being analyzed

@bader bader merged commit c252d7f into intel:sycl May 15, 2021
@AlexeySachkov AlexeySachkov deleted the private/asachkov/do-spec-const-after-split branch May 22, 2024 09:49
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