Skip to content
KernelIndex
Search⌘K

submission 514200

Zackary · python · License unknown

Use it

Vendorable · source mirrored · license unknownView source →

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

mxfp4-mm-splitk3-submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-514200?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
15.0µs
#571 of 1143
2026-03-07

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:305df2144047e4da75da372858d693f2861941b203ff47c269ff71d4701be0b1
license declaredunknown
license concludedunknown
authorsZackary
imported2026-08-26

Techniques

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

fp4Aggressive mxfp4-mm variant:
split-k- Force blockscale kernel with explicit splitK=3 (with safe fallback)

Kernel source

mxfp4-mm-splitk3-submission.py45 lines
"""
Aggressive mxfp4-mm variant:
- Keep fast reference pipeline (per-1x32 quant + pre-shuffled B)
- Force blockscale kernel with explicit splitK=3 (with safe fallback)
"""

from task import input_t, output_t


def custom_kernel(data: input_t) -> output_t:
    import aiter
    from aiter import QuantType, dtypes

    A, B, B_q, B_shuffle, B_scale_sh = data
    A = A.contiguous()
    m, k = A.shape
    n, _ = B.shape

    quant_func = aiter.get_triton_quant(QuantType.per_1x32)
    A_q, A_scale_sh = quant_func(A, shuffle=True)

    # Force explicit split-K path when available.
    try:
        out = A.new_empty(((m + 31) // 32 * 32, n), dtype=dtypes.bf16)
        # API from aiter.ops.gemm_op_a4w4.py
        aiter.gemm_a4w4_blockscale(
            A_q.view(m, k // 2),
            B_shuffle,
            A_scale_sh,
            B_scale_sh,
            out,
            splitK=3,
        )
        return out[:m]
    except Exception:
        # Safe fallback to baseline kernel path.
        return aiter.gemm_a4w4(
            A_q,
            B_shuffle,
            A_scale_sh,
            B_scale_sh,
            dtype=dtypes.bf16,
            bpreshuffle=True,
        )
scrolls · 45 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