-
Notifications
You must be signed in to change notification settings - Fork 787
[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
Conversation
@intel/sycl-language-enabling-triage: FYI |
sycl/test-e2e/OptionalKernelFeatures/no-fp64-optimization-declared-aspects.cpp
Show resolved
Hide resolved
sycl/test-e2e/OptionalKernelFeatures/no-fp64-optimization-declared-aspects.cpp
Outdated
Show resolved
Hide resolved
sycl/test-e2e/OptionalKernelFeatures/no-fp64-optimization-declared-aspects.cpp
Show resolved
Hide resolved
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.
e2e test lgtm
Co-authored-by: Marcos Maronas <maarquitos14@users.noreply.github.com>
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.
LGTM
The last commit only contains changes in test comments and previous CI run was green. I will proceed with the merge |
…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>
This PR changes
SYCLPropagateAspectsPass
to propagate aspects that come fromsycl_declared_aspects
even if they are excluded. The reason for this change is because a test likeno-fp64-optimization-declared-aspects.cpp
added in this PR would failed before with higher optimization level becausefp64
is not propagated (to allow for trivial uses offloat x = 1.5
to optimized out)device_has(fp64)
is inlined on higher optimizationsdouble
in its bodywhich 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.