triton.experimental.gluon.language.amd.cdna5.tdm.prefetch

triton.experimental.gluon.language.amd.cdna5.tdm.prefetch(src: tensor_descriptor, offsets: List[constexpr | tensor], pred: bool = True, speculative: bool = False, _semantic=None) None

Prefetches a block of tensor specified in tensor descriptor from global memory into L2.

Speculative prefetches can generate more efficient assembly because they do not require out of bounds checks. However, they are dropped by the hardware if their virtual address translation is not cached. So speculative should only be set if previous iterations have accessed the same virtual page (e.g. column major).

Parameters:
  • src (tensor_descriptor) – the source tensor descriptor.

  • offsets (List[int]) – the offsets from the base pointer in the tensor descriptor.

  • pred (bool, optional) – Predicate to enable or disable the prefetch. Defaults to True.

  • speculative (bool, optional) – Whether the prefetch is speculative. Defaults to False.