-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][libdevice] Add always_inline for libdevice functions. #5979
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
Signed-off-by: jinge90 <[email protected]>
This PR decorates all functions in SYCL libdevice with "always_inline" which is friendly to underlying runtime to do inline optimization. |
/summary:run |
Hi, @xtian-github Thanks very much. |
Yes. Thanks. |
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
I still have questions about reasoning of this fix. 1) Can "underlying runtime" do inlining without this attribute now? |
Actually, the current compiler is trying to do "always_inline" for device already, adding this attribute is to add certain guarantee. It does not increase the code size on device much. |
It sounds like the compiler is doing great job already and "is trying to do always_inline for device always". If there are cases where inlining is not done, then there are good reasons for that, right? Also, is this fix motivated by correctness or performance reasons? |
@v-klochkov provide guarantee on performance. |
Hi, @v-klochkov Thanks very much. |
Note: there are now numerous warnings in libdevice due to conflicting attributes:
|
Signed-off-by: jinge90 [email protected]