-
Am I wrong to assume how subgroup inclusive add is supposed to work? Does block_dim set the local_size_x or the dispatch size?
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The subgroup operations works in the size of "subgroups" which is a smaller unit than the However in this case your code is almost correct. Subgroup |
Beta Was this translation helpful? Give feedback.
-
For your case, you should use |
Beta Was this translation helpful? Give feedback.
For your case, you should use
reduce_add
because that does a All->One reduction and stores the sum in every thread. Then you can use elect.