submission 632414
fidel-makatia · python · License unknown
Use it
Vendorable · source mirrored · license unknownView source →
No package. Vendor the mirrored source: 30 lines, June 9 Researcher Reciprocity License v1.0.
submission.py
curl "https://kernelindex.com/api/v1/implementations/kernelbot-amd-mxfp4-mm-632414?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
Reported · How evidence levels are derived →
Source and license
sourceavailable
revision digestsha256:68c214ee28b74f75517e7d548367be2b54306d9906034e2481395b8cab81e7f1
license declaredunknown
license concludedunknown
authorsfidel-makatia
imported2026-08-26
Techniques
Extracted from the mirrored source by pattern, never inferred. Each row cites its line.
fp4
"""Optimized MXFP4 GEMM: minimize overhead between quant and gemm_a4w4."""Kernel source
submission.py30 lines
"""Optimized MXFP4 GEMM: minimize overhead between quant and gemm_a4w4."""
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
from task import input_t, output_t
# Pre-resolve the gemm function and dtypes at module level
_gemm_a4w4 = aiter.gemm_a4w4
_fp4x2 = dtypes.fp4x2
_e8m0 = dtypes.fp8_e8m0
_bf16 = dtypes.bf16
def custom_kernel(data: input_t) -> output_t:
A, B, B_q, B_shuffle, B_scale_sh = data
# Quantize A to MXFP4 with shuffled scales
A_q, A_scale = dynamic_mxfp4_quant(A)
A_scale_sh = e8m0_shuffle(A_scale)
# GEMM: A4W4 with pre-shuffled B
return _gemm_a4w4(
A_q.view(_fp4x2),
B_shuffle,
A_scale_sh.view(_e8m0),
B_scale_sh,
dtype=_bf16,
bpreshuffle=True,
)
scrolls · 30 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