Skip to content
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

spirv_new: fix test_decorate. #1980

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

hvdijk
Copy link
Contributor

@hvdijk hvdijk commented Jun 13, 2024

test_decorate was checking for half-precision NAN incorrectly, calling cl_half_from_float where cl_half_to_float was intended, causing a wrong expected result.

test_decorate was also printing the expected and actual results reversed, printing "got -1, want 0", when our implementation already returned 0.

test_decorate was checking for half-precision NAN incorrectly, calling
cl_half_from_float where cl_half_to_float was intended, causing a wrong
expected result.

test_decorate was also printing the expected and actual results
reversed, printing "got -1, want 0", when our implementation already
returned 0.
Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

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

Fix LGTM.

I was curious how we were passing these tests before this change, but looks like for whatever reason we were already computing val = 0 when rhs was NaN.

@bashbaug
Copy link
Contributor

Merging as discussed in the June 25th teleconference.

@bashbaug bashbaug merged commit c7b682f into KhronosGroup:main Jun 25, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants