Skip to content
KernelIndex
Search⌘K

submission 697682

sunfj · 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.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-697682?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.2µs
#961 of 1143
2026-04-02

Reported · How evidence levels are derived →

Source and license

sourceavailable
revision digestsha256:ddae170eeb6fbd8fd92006ee3660bd0dba5963ce833292c7119fa41240ccbb91
license declaredunknown
license concludedunknown
authorssunfj
imported2026-08-26

Techniques

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

fp4High-Performance MXFP4 GEMM kernel for AMD MI355X

Kernel source

submission.py36 lines
#!POPCORN leaderboard amd-mxfp4-mm
#!POPCORN gpu MI355X
"""
High-Performance MXFP4 GEMM kernel for AMD MI355X
Corrected version ensuring tensor compatibility
"""
import torch

try:
    from aiter import dtypes
    from aiter.ops.triton.quant import dynamic_mxfp4_quant
    from aiter.utility.fp4_utils import e8m0_shuffle
    from aiter import gemm_a4w4
except ImportError:
    pass

def custom_kernel(data):
    A, B, B_q, B_shuffle, B_scale_sh = data

    # 确保输入张量是连续的
    A_c = A.contiguous()

    # 执行量化操作
    a_fp4, a_scale = dynamic_mxfp4_quant(A_c)

    # 执行GEMM操作
    result = gemm_a4w4(
        a_fp4.view(dtypes.fp4x2),
        B_shuffle,
        e8m0_shuffle(a_scale).view(dtypes.fp8_e8m0),
        B_scale_sh,
        dtype=dtypes.bf16,
        bpreshuffle=True
    )

    return result
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