triton.experimental.gluon.language.amd.cdna4.scaled_downcast
- triton.experimental.gluon.language.amd.cdna4.scaled_downcast(input, scale, format, axis=-1, _semantic=None)
Scale and convert FP16, BF16, or FP32 values to a low-precision MX format, dividing by the raw E8M0
scalepayload (int8oruint8).formatselects the target type and packing behavior:"e4m3"/"e5m2"(fp8): elementwise, so the output keeps the shape and layout ofinput."e2m1"(packed fp4): consecutive pairs of values alongaxisare packed into one output byte (even element -> low nibble, next element -> high nibble), so the result extent alongaxisis halved (the inverse ofscaled_upcast).
axis(default: last dim) selects the dimension along which scales are shared.scalemust be compact alongaxiswith one E8M0 byte per block of consecutive input elements alongaxis, and each block must span a multiple of 8 consecutive input elements.