Skip to content

device-libs: Move trig edge case to input#1700

Merged
arsenm merged 1 commit intoamd-mainfrom
device-libs/move-trig-inf-checks
Mar 11, 2026
Merged

device-libs: Move trig edge case to input#1700
arsenm merged 1 commit intoamd-mainfrom
device-libs/move-trig-inf-checks

Conversation

@arsenm
Copy link
Copy Markdown

@arsenm arsenm commented Mar 9, 2026

Clamp infinities to nan on the input, instead of at the result. This allows the use code to see it doesn't need to handle infinities. This also reduces instruction count in the sincos cases.

@arsenm arsenm requested review from b-sumner and lamb-j as code owners March 9, 2026 18:59
@arsenm arsenm added the device-libs Related to Device Libraries label Mar 9, 2026
@z1-cciauto
Copy link
Copy Markdown
Collaborator

Comment thread amd/device-libs/ocml/src/cosD.cl
Clamp infinities to nan on the input, instead of at the result.
This allows the use code to see it doesn't need to handle infinities.
This also reduces instruction count in the sincos cases.
@arsenm arsenm force-pushed the device-libs/move-trig-inf-checks branch from 9008c4c to 0cbca22 Compare March 9, 2026 19:18
@z1-cciauto
Copy link
Copy Markdown
Collaborator

@arsenm
Copy link
Copy Markdown
Author

arsenm commented Mar 11, 2026

ping

Copy link
Copy Markdown
Collaborator

@b-sumner b-sumner left a comment

Choose a reason for hiding this comment

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

LGTM

@arsenm arsenm merged commit 5862d53 into amd-main Mar 11, 2026
2 of 3 checks passed
@arsenm arsenm deleted the device-libs/move-trig-inf-checks branch March 11, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

device-libs Related to Device Libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants