Skip to content
KernelIndex
Search⌘K

submission 567805

Selva Ragavan · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-567805?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
#897 of 1143
2026-03-16

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:41281137ccd2a007f792ebd8c82a1bf7f0f9a6d35850e77611d81fc236e88436
license declaredunknown
license concludedunknown
authorsSelva Ragavan
imported2026-08-26

Kernel source

submission.py32 lines
import torch
import aiter
from aiter import dtypes
from aiter.ops.triton.quant import dynamic_mxfp4_quant
from aiter.utility.fp4_utils import e8m0_shuffle

# Cache for CUDA graphs per shape
_graph_cache = {}
_static_inputs = {}
_static_outputs = {}

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

def _run_kernel(A, B_shuffle, B_scale_sh):
    A = A.contiguous()
    A_q, A_scale_sh = _quant_mxfp4_shuffle(A)
    return aiter.gemm_a4w4(
        A_q,
        B_shuffle,
        A_scale_sh,
        B_scale_sh,
        dtype=dtypes.bf16,
        bpreshuffle=True,
    )

def custom_kernel(data):
    A, B, B_q, B_shuffle, B_scale_sh = data
    return _run_kernel(A, B_shuffle, B_scale_sh)
scrolls · 32 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