-
Notifications
You must be signed in to change notification settings - Fork 555
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-fuzz: Support atomic operations opcode #4348
spirv-fuzz: Support atomic operations opcode #4348
Conversation
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 for making a start. However, more care is required to identify exactly which operands of these new instructions are agnostic to signedness - it's not true for all operands.
Also, you should enable the disabled test associated with this issue, and enhance that test to feature examples for each of the new instructions you've considered here. If you can try to cover them all in the test that would be great - or at least the ones that use Shader capability.
3ad309a
to
13e35c0
Compare
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 for the progress on this - some comments inline.
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.
Some clarifications.
9e2753d
to
3edc24a
Compare
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.
Looks good - just a couple of comment-related things and then we're good to merge, I think.
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.
Looks good! Bots running.
@Mostafa-ashraf19 The bots failed due to a death test not working as expected:
Can you try this test out locally in a debug build and investigate, please? |
@afd I made a test locally and it's currently working well. |
Fixes #4345.
This PR is responsible for supporting atomic operations opcode and checks it's in operands signedness neutrality.
Example:
Original shader
SPIRV-Tools/test/fuzz/transformation_replace_id_with_synonym_test.cpp
Lines 1911 to 1948 in 8cc8b65
After applying transformation
SPIRV-Tools/test/fuzz/transformation_replace_id_with_synonym_test.cpp
Lines 1992 to 2029 in 8cc8b65
That's the Important changes from original shader
%21 = OpAtomicLoad %6 %14 %15 %20
, and this transformed shader%21 = OpAtomicLoad %6 %14 %100 %101
.