jax.experimental.pallas.Blocked

jax.experimental.pallas.Blocked#

class jax.experimental.pallas.Blocked(block_size)[source]#

Slices fixed-size blocks of block_size along a dimension.

index_map returns a scalar block index b, slicing [b * block_size : (b + 1) * block_size].

block_shape=(Blocked(2), Blocked(3)), index_map -> (1, 0)
  array (4, 6):          ref (2, 3):
    . . . | . . .          a b c
    . . . | . . .   ->     d e f
    ------+------
    a b c | . . .
    d e f | . . .
Parameters:

block_size (int)

__init__(block_size)#
Parameters:

block_size (int)

Return type:

None

Methods

__init__(block_size)

Attributes

block_size