Skip to content

[libclc] Move exp, exp2 and expm1 to the CLC library #133932

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 1 commit into from
Apr 1, 2025

Conversation

frasercrmck
Copy link
Contributor

These all share the use of a common helper function so are handled in one go. These builtins are also now vectorized.

These all share the use of a common helper function so are handled in
one go. These builtins are also now vectorized.
@frasercrmck frasercrmck added the libclc libclc OpenCL library label Apr 1, 2025
@frasercrmck frasercrmck requested a review from arsenm April 1, 2025 16:20
const __CLC_GENTYPE llim = -126.0f;

r = x < llim ? 0.0f : r;
r = x < ulim ? r : __CLC_AS_FLOATN((__CLC_UINTN)0x7f800000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should just use infinity as a later cleanup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there's good opportunity for infinity-related improvements.

@frasercrmck frasercrmck merged commit f14ff59 into llvm:main Apr 1, 2025
10 of 11 checks passed
@frasercrmck frasercrmck deleted the libclc-clc-exp-exp2-expm1 branch April 1, 2025 17:15
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request Apr 2, 2025
These all share the use of a common helper function so are handled in
one go. These builtins are also now vectorized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libclc libclc OpenCL library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants