jax.experimental.pallas.Element#
- class jax.experimental.pallas.Element(block_size, padding=(0, 0))[source]#
Indexes a dimension by element index rather than block index.
index_mapreturns the scalar start indexi, slicing[i : i + block_size]. Optionalpadding=(lo, hi)virtually pads the dimension before slicing. Pad values read in the kernel are undefined.block_shape=(Element(2), Element(3)), index_map -> (1, 2) array (4, 6): ref (2, 3): . . . . . . a b c . . a b c . -> d e f . . d e f . . . . . . . block_shape=(Element(2, padding=(1, 2)), 4), index_map -> (0, 0) padded (5, 4): ref (2, 4): ? ? ? ? (lo=1) ? ? ? ? (?: undefined) ------- -> a b c d a b c d . . . . ------- ? ? ? ? (hi=2) ? ? ? ?- __init__(block_size, padding=(0, 0))#
Methods
__init__(block_size[, padding])Attributes
paddingblock_size