jax.pallas.tpu_sc.store_compressed#
- jax.pallas.tpu_sc.store_compressed(ref, x, *, mask)[source]#
Performs a compressed masked store to a ref.
Elements from
xwheremaskisTrueare placed intoref. The elements are written torefsequentially, meaning the i-thTruevalue inmaskcorresponds to writing toref[i].For example, if the mask is
[True, False, True, True], the elementsx[0],x[2], andx[3]are written toref[0],ref[1], andref[2]respectively.- Parameters:
ref (AbstractRef | TransformedRef) – The ref to store into.
x (Array) – The array to store. Must have the same shape as
ref.mask (Array) – A boolean mask specifying which elements from
xto store.
- Return type:
None