Skip to content

Commit 307bca0

Browse files
WindQAQGoogle-ML-Automation
authored andcommitted
[Mosaic] Support packed BroadcastInSublanesOp.
PiperOrigin-RevId: 839747685
1 parent 6fa5ef5 commit 307bca0

File tree

1 file changed

+7
-3
lines changed
  • jaxlib/mosaic/dialect/tpu

1 file changed

+7
-3
lines changed

jaxlib/mosaic/dialect/tpu/tpu.td

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,13 @@ def TPU_RepeatOp : TPU_Op<"repeat", [Pure]> {
624624

625625
def TPU_BroadcastInSublanesOp : TPU_Op<"broadcast_in_sublanes", [Pure]> {
626626
let description = [{
627-
For each sublane `i`, broadcasts the value in lane `lane + i` along the entire
628-
sublane. If `lane + i` is not in [0, lane_count), then the value in sublane `i`
629-
is not defined (can be anything).
627+
For each sublane `i`, broadcasts the value in lane `lane + i` along the
628+
entire sublane. For packed type, imagine the data is compressed unpacked
629+
along sublane dimension, and the sublane count is multiplied by the packing
630+
factor.
631+
For example, for i16 with sublane count 8, `i` above is in [0, 8 * 2).
632+
If `lane + i` is not in [0, lane_count), then the value in sublane `i` is
633+
not defined (can be anything).
630634
}];
631635
let arguments = (ins
632636
TPU_Vreg:$source, // All sublanes should be equal.

0 commit comments

Comments
 (0)