jax.pallas.tpu_sc.store_scatter

Contents

jax.pallas.tpu_sc.store_scatter#

jax.pallas.tpu_sc.store_scatter(ref, indices, x, *, mask=None)[source]#

Scatters an array to a ref.

Parameters:
  • ref (AbstractRef | TransformedRef) – The ref in VMEM to scatter to.

  • indices (Sequence[Array]) – A sequence of 1D arrays, one for each dimension of ref. Each array specifies an index for that dimension. All arrays must have the same size.

  • x (Array) – The array to store.

  • mask (Array | None) – An optional boolean array, which specifies which elements to store. If None, all elements are stored.

Return type:

None