jax.experimental.pallas.Indirect#
- class jax.experimental.pallas.Indirect(block_size)[source]#
Indexes a dimension via gather (for inputs) or scatter (for outputs).
index_mapreturns anArrayorRefof indices along this dimension, yielding an axis of sizeblock_sizein the kernelRef.block_shape=(Indirect(2), 4), index_map -> ([3, 0], 0) array (4, 4): ref (2, 4): e f g h (row 0) a b c d <- row 3 . . . . -> e f g h <- row 0 . . . . a b c d (row 3)- Parameters:
block_size (int)
Methods
__init__(block_size)Attributes
block_size