triton.experimental.gluon.language.amd.cdna5.scaled_upcast
- triton.experimental.gluon.language.amd.cdna5.scaled_upcast(src, scale, elem_type, axis=None, _semantic=None)
Upcast an fp4 or fp8 tensor and fold raw E8M0 scale payload into the CDNA5 scaled-upcast op.
The
scaletensor must contain raw E8M0 payload inint8oruint8.elem_typemust befp16orbf16.FP8 inputs
axismust beNone.scalemust have the same shape and layout assrc.
FP4 inputs
axisselects the packed fp4 dimension. Two scale layouts are supported:Expanded scale: one scale per output value. For example, fp4 bytes
[M, K / 2]produce output[M, K]with scale[M, K].Compact scale: one scale per scale block. For example, with
axis=1and a 32-element scale block, output[M, K]uses scale[M, K / 32].