jax.experimental.pallas.mosaic_gpu.async_copy_smem_to_tmem

jax.experimental.pallas.mosaic_gpu.async_copy_smem_to_tmem#

jax.experimental.pallas.mosaic_gpu.async_copy_smem_to_tmem(smem_ref, tmem_ref, collective_axis=None)[source]#

Copies data from SMEM to TMEM using the tcgen05.cp instruction.

The source SMEM ref must have tiling and swizzle transforms applied. The destination TMEM ref must use packed layout (i.e. packed=True for sub-32b types).

The copy is performed asynchronously. It can be awaited by calling tcgen05_commit_arrive and waiting on the specified barrier. No synchronization is necessary if the target of the copy is used by a tcgen05_mma operation.

Parameters:
  • smem_ref (_Ref) – The SMEM reference to copy from.

  • tmem_ref (_Ref) – The TMEM reference to copy into.

  • collective_axis (AxisName | None) – The name of the cluster axis along which the copy should be performed collectively. The cluster axis should have a size of exactly 2, and must be on the minormost cluster axis.