Skip to content

libclc: generic: add half implementation for erf/erfc #66901

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
Jan 9, 2024

Conversation

rjodinchr
Copy link
Contributor

libclc does not have a half implementation for erf/erfc
Add one based on the float implementation by extending the input and truncating the output.

libclc does not have a half implementation for erf/erfc
Add one based on the float implementation by extending the input and
truncating the output.
@rjodinchr
Copy link
Contributor Author

@kpet @alan-baker could you review this PR please?

Copy link
Collaborator

@kpet kpet left a comment

Choose a reason for hiding this comment

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

Looks infinitely better than the absence of FP16 implementation we currently have. I have not tried to think through rounding and other detailed considerations. The OpenCL CTS currently does not cover FP16 variants of these functions but I believe this is in the works. We can revisit the implementation if the conformance tests reveal issues.

@kpet kpet merged commit 9160f49 into llvm:main Jan 9, 2024
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
libclc does not have a half implementation for erf/erfc
Add one based on the float implementation by extending the input and
truncating the output.
@rjodinchr rjodinchr deleted the pr/erf branch March 15, 2024 07:53
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.

2 participants