Skip to content
KernelIndex
Search⌘K

submission 728770

DevSecSmith · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

No package. Vendor the mirrored source: 36 lines, June 9 Researcher Reciprocity License v1.0.

submission-mxfp4-mm.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-728770?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
AMD MXFP4 GEMMsuite of 6 cases
AMD Instinct MI355X
24.0µs
#854 of 1143
2026-04-04

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:88288b276c4f4365fbbb023e9e5b63fc560e666e5abec1d37c3a975ac2ec8070
license declaredunknown
license concludedunknown
authorsDevSecSmith
imported2026-08-26

Kernel source

submission-mxfp4-mm.py36 lines
import torch
from task import input_t, output_t
from utils import make_match_reference


def ref_kernel(data: input_t) -> output_t:
    import aiter
    from aiter import dtypes
    from aiter.ops.triton.quant import dynamic_mxfp4_quant
    from aiter.utility.fp4_utils import e8m0_shuffle
    A, B, B_q, B_shuffle, B_scale_sh = data
    q, s = dynamic_mxfp4_quant(A.contiguous())
    Aq = q.view(dtypes.fp4x2)
    Asc = e8m0_shuffle(s).view(dtypes.fp8_e8m0)
    return aiter.gemm_a4w4(
        Aq, B_shuffle, Asc, B_scale_sh,
        dtype=dtypes.bf16, bpreshuffle=True,
    )


def custom_kernel(data: input_t) -> output_t:
    import aiter
    from aiter import dtypes
    from aiter.ops.triton.quant import dynamic_mxfp4_quant
    from aiter.utility.fp4_utils import e8m0_shuffle
    A, B, B_q, B_shuffle, B_scale_sh = data
    q, s = dynamic_mxfp4_quant(A)
    Aq = q.view(dtypes.fp4x2)
    Asc = e8m0_shuffle(s).view(dtypes.fp8_e8m0)
    return aiter.gemm_a4w4(
        Aq, B_shuffle, Asc, B_scale_sh,
        dtype=dtypes.bf16, bpreshuffle=True,
    )


check_implementation = make_match_reference(ref_kernel, rtol=1e-02, atol=1e-02)
scrolls · 36 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