Skip to content
KernelIndex
Search⌘K

submission 678940

Ada · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-678940?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.1µs
#926 of 1143
2026-03-31

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:7f00aabd23e6d43255bbd1c95948ed6d275d84b961ccc8d608cdeca56a62bfc9
license declaredunknown
license concludedunknown
authorsAda
imported2026-08-26

Techniques

Extracted from the mirrored source by pattern, never inferred. Each row cites its line.

fp4Low-bit layout-normalized retry for mxfp4-mm.

Kernel source

submission.py49 lines
#!POPCORN leaderboard amd-mxfp4-mm
#!POPCORN gpu MI355X

"""
Low-bit layout-normalized retry for mxfp4-mm.

Keep the baseline a4w4 semantics unchanged, but normalize A-side packed buffers
and B-side preshuffled inputs to contiguous layouts before gemm_a4w4 so the
trial stays comparable while probing a smaller layout-handling overhead surface.
"""

import aiter
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 _as_contiguous(x):
    if x.is_contiguous():
        return x
    return x.contiguous()


def _quant_mxfp4(x):
    x_fp4, bs_e8m0 = dynamic_mxfp4_quant(x)
    bs_e8m0 = e8m0_shuffle(bs_e8m0)
    x_fp4 = x_fp4.view(dtypes.fp4x2)
    bs_e8m0 = bs_e8m0.view(dtypes.fp8_e8m0)
    return _as_contiguous(x_fp4), _as_contiguous(bs_e8m0)


def custom_kernel(data: input_t) -> output_t:
    A, _, _, B_shuffle, B_scale_sh = data
    A = _as_contiguous(A)
    B_shuffle = _as_contiguous(B_shuffle)
    B_scale_sh = _as_contiguous(B_scale_sh)

    A_q, A_scale_sh = _quant_mxfp4(A)
    return aiter.gemm_a4w4(
        A_q,
        B_shuffle,
        A_scale_sh,
        B_scale_sh,
        dtype=dtypes.bf16,
        bpreshuffle=True,
    )
scrolls · 49 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