submission 679253
Shellmia0 · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 31 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-679253?include=source"interfacepython
Compatibility
measured onAMD Instinct MI355X
declared hardwareAMD Instinct MI355X
architecturesgfx950
dtypesbf16, mxfp4
Benchmark evidence
1 measurement across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:c3928b4275e1edf69c239dc710ac94fd9184538991f32fb75ed9184e7f493d50
license declaredunknown
license concludedunknown
authorsShellmia0
imported2026-08-26
Kernel source
submission.py31 lines
from __future__ import annotations
import aiter
import torch
from aiter import dtypes
from aiter.ops.triton.quant import dynamic_mxfp4_quant
from aiter.utility.fp4_utils import e8m0_shuffle
from task import input_t, output_t
def _quantize_activation(a: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:
a_bf16 = a.contiguous().to(dtype=torch.bfloat16)
a_q, a_scale = dynamic_mxfp4_quant(a_bf16)
a_scale_sh = e8m0_shuffle(a_scale)
return a_q.view(dtypes.fp4x2), a_scale_sh.view(dtypes.fp8_e8m0)
def custom_kernel(data: input_t) -> output_t:
a, _b_dense, _b_q, b_shuffle, b_scale_sh = data
a_q, a_scale_sh = _quantize_activation(a)
out = aiter.gemm_a4w4(
a_q,
b_shuffle,
a_scale_sh,
b_scale_sh,
dtype=dtypes.bf16,
bpreshuffle=True,
)
return out[: a.shape[0], : b_shuffle.shape[0]]
scrolls · 31 lines total
Source code from GPU Mode and the KernelBot dataset · June 9 Researcher Reciprocity License v1.0
Best evidence level for this revision: reported
JSON