-
Notifications
You must be signed in to change notification settings - Fork 86
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
Compat: Refactor memory module tests to use 4 storage buffers #3117
Conversation
Previews, as seen when this build job started (8ed631b): |
ping |
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 taking this on.
Thank you for your patience as well.
I'm requesting two changes:
- use the same tweaked workgroup throughout
- avoid false sharing between the sub-buffers.
It was written quite some time ago. Originated here: https://gpuharbor.ucsc.edu/webgpu-mem-testing/ I'm not particularly bothered, but thank you for avoiding style-based rewrites in this PR. |
For the long answer, read the "MC Mutants" paper: https://dl.acm.org/doi/10.1145/3575693.3575750 The short answer is @reeselevine did experiments to heuristically search for ways to evoke weak memory behaviours via various techniques (read the paper). The 256 is basicaly arbitrary. Changing it to 128 is still valid bit pushes it into an unexamined regime. My intuition is the test is probably as effective as before, or close to it. IMHO it's good to keep it 256 for baseline WebGPU and limit it to 128 for the compat case. It's fine, no sweat. Does it do anything? Yes. |
8ed631b
to
e150fde
Compare
Thanks David! I think I addressed the issues you brought up. PTAL. Had to force push because I needed to deal with Kai's changes here #3114 |
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.
LGTM.
Your choice whether to use align
instead of Math.max
. align would be better.
thanks
So ... maybe this test was written against older WGSL but it's not clear to me why the code was
Instead of just
But, because it was already that way, the smallest change seemed to be to leave it that way. I can go change them all to get rid of the struct and just use arrays directly. Access would switch from
combo.thing.value[ndx]
tocombo.thing[ndx]
.Similarly, it's unclear why
barrier
is defined as an array and not just a single value. I could change that as well assuming there isn't some reason it's an array.Also, compat has a maxWorkgroupSizeX of 128. I switched the code to use 128 in compat and didn't change any other code. It passes. I'd have expected to have to change something else to say "only check 128 results" or something to that effect. That makes me concerned the test is not actually testing anything. I didn't dig though.
Issue: #3049
Requirements for PR author:
.unimplemented()
./** documented */
and new helper files are found inhelper_index.txt
.Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.