-
Notifications
You must be signed in to change notification settings - Fork 25
Remove subgroup_uniform_control_flow test.
#500
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
Conversation
|
cc: @s-perron |
test/Feature/MaximalReconvergence/subgroup_uniform_control_flow.test
Outdated
Show resolved
Hide resolved
28cc66d to
bfebf1e
Compare
bfebf1e to
d86c230
Compare
s-perron
left a comment
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.
I think the test needs to be updated again.
I'm also not sure what this is trying to test anymore. Before, the code in the if and else block were the "same", so a compiler might try to remove the if-statement:
if (c) dosomething();
else dosomething();
is equivalent to
dosomething()
for CPUs. In that vain, I could see some compiler optimizations being done that would merge the execution of the calls to WaveActiveMax(TID.x). Looking at this new test, each call is distinct. Can you add a comment explaining what you are trying to check in this case?
test/Feature/MaximalReconvergence/subgroup_uniform_control_flow.test
Outdated
Show resolved
Hide resolved
| if (TID.x % 2 == 0) { | ||
| Out[TID.x] = WaveActiveSum(TID.x); | ||
| if (TID.x % 4 == 0) { | ||
| result += WaveActiveSum(div4); |
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.
You need to do something that will work for all wave sizes. This does not work for wave sizes 1 and 2.
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.
Hi Steven, I think the minimum wave size we can get is 4 from the spec
But please let me know if there are preferred ways to test different wave size (and get same result!).
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.
I don't know if that is true in Vulkan.
https://docs.vulkan.org/spec/latest/chapters/interfaces.html#interfaces-builtin-variables-sgs
The minimum size is implementation defined by the minSubgroupSize, and it must be at least 1: https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#limits-minSubgroupSize
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.
(I guess it still doesn't work if the wave size is an odd number.. 5, 7)
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.
But please let me know if there are preferred ways to test different wave size (and get same result!).
I'm not sure how to do that. We can work on it.
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.
(I guess it still doesn't work if the wave size is an odd number.. 5, 7)
Wave size (& I'm pretty sure subgroup size in vulkan) will always be a power of 2.
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.
Correct it has to be a power of two in vulkan
d542a75 to
50f92ef
Compare
|
Sorry, I understood your comment. Changed the test to have the same block, to trigger compiler optimization.
|
f55b82b to
681fc1f
Compare
681fc1f to
6a2444e
Compare
d760594 to
235c407
Compare
subgroup_uniform_control_flow test.
Update 11/03/2025
We would like to remove this test and add similar tests when porting vulkan conformance tests. Currently, there's not a good way to specify the subgroup size inside the tests.
Fixes #490