Skip to content

[SYCL] Fix handling of unpacked POD spec constants #2926

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

Conversation

AlexeySachkov
Copy link
Contributor

Fixed calculating of offsets to scalar elements of composite spec constants
by taking into account paddings, that might be instered into a struct
by the compiler to make it elements aligned.

Fixed calculating of offsets to scalar elements of composite spec constants
by taking into account paddings, that might be instered into a struct
by the compiler to make it elements aligned.
@AlexeySachkov AlexeySachkov requested review from kbobrovs and a team as code owners December 21, 2020 14:00
@@ -213,26 +213,38 @@ getScalarSpecConstMetadata(const Instruction *I) {
/// Recursively iterates over a composite type in order to collect information
/// about its scalar elements.
void collectCompositeElementsInfoRecursive(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to have a unit-test for this change in the pass. Technically I can do that by looking into a properties file generated by sycl-post-link, but non-scalar properties are encoded using base64, so, it won't be an expressive test. However, this will be my plan if I didn't think of anything better. Any ideas are welcome

Copy link
Contributor

Choose a reason for hiding this comment

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

I assumed the fix is needed urgently and the test will follow shortly, so I approved.

My idea would be adding logging to the spec constants pass and verifying the log output is expected. IIRC, some of passes use this approach.

@romanovvlad romanovvlad merged commit 3ec4594 into intel:sycl Dec 22, 2020
@AlexeySachkov AlexeySachkov deleted the private/asachkov/fix-handling-of-unpacked-composite-spec-constants branch February 25, 2021 12:27
jsji pushed a commit that referenced this pull request Dec 31, 2024
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