Script.store_global_scatter

Script.store_global_scatter

Script.store_global_scatter(dst, *, dim, indices, values)

Non-atomic scatter store into a global tensor.

For each tile element k, writes dst[..., indices[k], ...] = values[k] where indices selects positions along dim. indices.shape and values.shape must match exactly and share a RegisterLayout.

Under duplicate indices the outcome is last-writer-wins with unspecified winner; use atomic.global_scatter_add() (or similar) if correctness under duplicates matters.

Parameters:
  • dst (GlobalTensor) – Destination tensor.

  • dim (int) – Compile-time scatter axis.

  • indices (RegisterTensor) – Integer indices along dim.

  • values (RegisterTensor) – Values to write; values.shape == indices.shape, identical layout.

Return type:

None

Notes

  • Thread group: Can be executed by any sized thread group.