triton.experimental.gluon.language.amd.cdna3.buffer.load
- triton.experimental.gluon.language.amd.cdna3.buffer.load(desc, offsets, mask=None, other=None, *, soffset=None, scope=None, cache_policy=None, _semantic=None)
Load from global memory through a buffer descriptor into registers.
Element
iis read frombase + soffset + offsets[i]. Out-of-bounds elements read zero, and masked-off elements readother, or zero without it. Seemake_buffer_descriptor()for the bounds.- Parameters:
desc (buffer_descriptor) – Descriptor of the global memory to load from.
offsets (tensor) – Offsets of the elements to load, in elements.
mask (tensor, optional) – Mask tensor for predicated loads. Defaults to None.
other (tensor or scalar, optional) – Values for masked-off elements. Defaults to None.
scope (str, optional) –
"cta","gpu"or"sys". The load reads data visible at that scope. It is not atomic and orders no other memory operation; pair it with an acquire to consume a payload. To poll a flag, useatomic_load()instead, which the compiler never hoists. Defaults to None (no coherence beyond the wave).soffset (int32 scalar or tensor, optional) – Offset, in elements, added to every element’s offset and counted by the bounds check. It is held in the instruction’s scalar offset register, so a uniform advance costs no per-lane arithmetic. A tensor gives each wave its own value: it broadcasts to
offsetsand must have size 1 in every dimension the lanes of the offsets’ layout span, e.g. shape[M, 1]for[M, N]offsets whose rows each sit in one wave. Defaults to None (0).cache_policy (CachePolicy, optional) – Cache hints. Defaults to None.
- Returns:
The loaded values, with the shape and layout of
offsets.- Return type: