-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix issues of fract(x) #2804
Fix issues of fract(x) #2804
Conversation
Similar to #2793 |
Test summary for commit 4f7ba6fCTS tests (Failed: 4/138184)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
Test summary for commit ddd7b51CTS tests (Failed: 436/138265)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
There are some failures. I will fix them first. Please don't review until the revised change is ready. |
2dc262f
to
dab3dde
Compare
Test summary for commit 2dc262fCTS tests (Failed: 247/138265)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
Test summary for commit dab3ddeCTS tests (Failed: 0/138265)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
Test summary for commit dab3ddeCTS tests (Failed: 0/138184)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
All previous failures are now cleared. It is ready for review. |
Test summary for commit d95b40aCTS tests (Failed: 0/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
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.
Is there a similar discussion ongoing about changing SPIR-V to require this? I've also followed up internally by email.
The problem is similar to modf(x) when x=-0.0 or +INF/-INF. Although SPIR-V spec says nothing about such cases, the OpenCL spec does define the results of those operations as follow: fract(-0.0) = -0.0 fract(+INF) = 0.0 fract(-INF) = -0.0 Hence, we follow what have been done for modf.
Test summary for commit 73bb454CTS tests (Failed: 0/138443)
Ubuntu navi3x, SrdcvkUbuntu navi2x, Srdcvk |
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.
Thanks!
I will merge it as temporary solution. The SPIR-V workgroup might continue to discuss this issue and clarify it in the future SPIR-V revision. If new expectation is made, I will follow up. |
This change reverts the PR GPUOpen-Drivers#2804. After SPIR-V workgroup discussed the issues of fract(x), they decide to align fract(-0.0), fract(-INF), and fract(INF) with DXIL's definitions. Our original implementation is fine enough to meet the spec requirements.
The problem is similar to modf(x) when x=-0.0 or +INF/-INF. Although SPIR-V spec says nothing about such cases, the OpenCL spec does define the results of those operations as follow:
Hence, we follow what have been done for modf.