Skip to content
KernelIndex
Search⌘K

mm_fp4_out_nvfp4_flashinfer_n2048_k2048

FlashInfer-Bench baselines · python · Apache-2.0

Use it

Vendorable · source mirrored · Apache-2.0View source →

No package. Vendor the mirrored source: 13 lines, Apache-2.0, pinned at da91508.

main.py
curl "https://kernelindex.com/api/v1/implementations/flashinfer-mm-fp4-out-nvfp4-flashinfer-n2048-k2048?include=source"
interfacepython
revisionda915083d4c7
symbolrun
pathmain.py
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesbf16

Benchmark evidence

2 measurements across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
NVIDIA B200
354.7µs
#1 of 1
2026-06-06
NVIDIA B200
358.8µs
#1 of 1
2026-06-06

Reproduction-ready · How evidence levels are derived →

Source and license

sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:47dfc33bd3e8727fcdf9a45d4f0ad6c0f0521ad3051d572532261a38e8429a35
license declaredApache-2.0
license concludedApache-2.0
authorsbaseline
imported2026-08-16

Kernel source

main.py13 lines
import torch
import flashinfer

def run(A, B):
    a4, a_sf = flashinfer.mxfp4_quantize(A)
    b4, b_sf = flashinfer.mxfp4_quantize(B)
    C = torch.empty(A.shape[0], B.shape[0], device=A.device, dtype=torch.bfloat16)
    flashinfer.mm_fp4(a4, b4.T, a_sf, b_sf.T, None, torch.bfloat16, C,
                      block_size=32, use_8x4_sf_layout=False, backend="auto", use_nvfp4=False)
    gs = torch.tensor(1.0, device=A.device)
    cq, cs = flashinfer.nvfp4_quantize(C, gs, sfLayout=flashinfer.SfLayout.layout_128x4, do_shuffle=False)
    return cq.view(torch.int8), cs.view(torch.int8)

Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0

Best evidence level for this revision: reproducible

JSON