jax.pallas.tpu_sc.fetch_and_add

Contents

jax.pallas.tpu_sc.fetch_and_add#

jax.pallas.tpu_sc.fetch_and_add(x_ref, value, *, subcore_id)[source]#

Adds value to the x_ref on another subcore.

Be careful to ensure subcores are synchronized between initializing the SMEM (on the target subcore) and adding to it, potentially using plsc.subcore_barrier().

Parameters:
Returns:

The value of x_ref on the specified subcore before adding value.

Return type:

Array