kernel.subgroup.shuffle
← kernel dialect
Move a scalar or rank-1 vector value across lanes of the current subgroup. The result value has the same type as the input value, and the valid result reports whether the named source lane participated.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Convergent, HasAncestor(kernel.def) |
| Target contracts |
kernel.synchronization |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
value |
any |
required |
Per-invocation value to move. |
| Operand |
offset |
integer |
required |
i32 lane offset or lane index interpreted by mode. |
| Operand |
width |
integer |
required |
i32 active subgroup width. |
| Result |
result |
any |
required |
Value read from the selected source lane. |
| Result |
valid |
i1 |
required |
True when the selected source lane is valid. |
| Attribute |
mode |
enum KernelSubgroupShuffleMode |
required |
Lane addressing mode. |
Verification constraints
Examples
%r, %valid = kernel.subgroup.shuffle<xor> %v, %offset, %width : f32, i32, i32