-
Notifications
You must be signed in to change notification settings - Fork 787
[libclc] Cherry-pick two dropped upstream commits #16249
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
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.
Do we know why they were dropped i.e. is this an accident, or was there a reason to avoid this? @jsji could maybe comment.
Also, these will be squashed unless a maintainer can merge them properly.
Otherwise LGTM
#16015 They are reverted due to conflicts that needs @frasercrmck 's help. |
e989ecd
to
68cdf05
Compare
Yeah. Last time (#15948) we were able to merge them "properly" because they acted as a pulldown. If that's not possible this time around I'll have to create two separate PRs for them - squashing upstream commits isn't a good look. |
The OpenCL relational functions now call their CLC counterparts, and the CLC relational functions are defined identically to how the OpenCL functions were defined. As usual, clspv and spir-v targets bypass these. No observable changes to any libclc target (measured with llvm-diff).
68cdf05
to
37f93d9
Compare
@sarnex would it be possible to merge these two cherry-picks, please? If squashing is the only option I'd rather close this PR and open a new one per cherry-pick. |
@frasercrmck Yeah squash is the only option unfortunately: |
Ah, okay, thanks. Just that in #15948 it seemed like you were able to merge as if it were a pulldown. Has something changed? |
ok i think i can do it manually, hold on |
@frasercrmck Ok I think I did the right thing, if I didn't, I know even know if it's possible to undo it so sorry :P |
Thank you! I'll try and avoid it in the future, in that case. It's just that sometimes there can be half a dozen little commits to cherry-pick for libclc, and opening a PR for each individually seems silly to me. |
yeah for cherry picking preserving the history is better, thanks! |
This PR cherry-picks two upstream libclc commits which were dropped during pulldowns:
Resolves #16015.
There are some changes to NVPTX libspirv generation, for example:
This is because
__clc
functions are using__clc
functions internally, as are done in upstream. In the case above,__clc_tan
now calls__clc_fabs
instead of__spirv_ocl_fabs
- the latter of which is specialized on NVPTX to call__nv_fabs
. This should be fine, and ideally more performant. This shows also that the libspirv builtins are still in an in-between state. Follow-up patches will attempt to bring them more in line with upstream.