Skip to content

[SYCL] Propagate explicitly declared aspects even if excluded #10650

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 4 commits into from
Aug 9, 2023

Conversation

jzc
Copy link
Contributor

@jzc jzc commented Aug 2, 2023

This PR changes SYCLPropagateAspectsPass to propagate aspects that come from sycl_declared_aspects even if they are excluded. The reason for this change is because a test like no-fp64-optimization-declared-aspects.cpp added in this PR would failed before with higher optimization level because

  • on the first aspect propagation pass, fp64 is not propagated (to allow for trivial uses of float x = 1.5 to optimized out)
  • the call to the function marked with device_has(fp64) is inlined on higher optimizations
  • that function does not actually use double in its body

which means no usage of double ends up in the optimized function, leading the second aspect propagation pass to not attach fp64 to its used aspects metadata.

@jzc jzc requested review from a team as code owners August 2, 2023 06:09
@jzc jzc requested a review from aelovikov-intel August 2, 2023 06:09
@jzc jzc temporarily deployed to aws August 2, 2023 06:31 — with GitHub Actions Inactive
@jzc jzc temporarily deployed to aws August 2, 2023 07:09 — with GitHub Actions Inactive
@AlexeySachkov
Copy link
Contributor

@intel/sycl-language-enabling-triage: FYI

@jzc jzc temporarily deployed to aws August 3, 2023 05:10 — with GitHub Actions Inactive
@jzc jzc temporarily deployed to aws August 3, 2023 05:48 — with GitHub Actions Inactive
Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

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

e2e test lgtm

Co-authored-by: Marcos Maronas <maarquitos14@users.noreply.github.com>
Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexeySachkov
Copy link
Contributor

The last commit only contains changes in test comments and previous CI run was green. I will proceed with the merge

@AlexeySachkov AlexeySachkov merged commit bf97252 into intel:sycl Aug 9, 2023
mdtoguchi pushed a commit to mdtoguchi/llvm that referenced this pull request Oct 18, 2023
…10650)

This PR changes `SYCLPropagateAspectsPass` to propagate aspects that
come from `sycl_declared_aspects` even if they are excluded. The reason
for this change is because a test like
`no-fp64-optimization-declared-aspects.cpp` added in this PR would
failed before with higher optimization level because

- on the first aspect propagation pass, `fp64` is not propagated (to
allow for trivial uses of `float x = 1.5` to optimized out)
- the call to the function marked with `device_has(fp64)` is inlined on
higher optimizations
- that function does not actually use `double` in its body

which means no usage of double ends up in the optimized function,
leading the second aspect propagation pass to not attach `fp64` to its
used aspects metadata.

---------

Co-authored-by: Alexey Sachkov <alexey.sachkov@intel.com>
Co-authored-by: Marcos Maronas <maarquitos14@users.noreply.github.com>
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.

7 participants