cublaslt_fp4_e2m1_scaled_mm_n4096_k2048
FlashInfer-Bench baselines · python · Apache-2.0
Kernel source · 19 lines ↓holds 3 records
Use it
Vendorable · source mirrored · Apache-2.0View source →
No package. Vendor the mirrored source: 19 lines, Apache-2.0, pinned at da91508.
main.py
curl "https://kernelindex.com/api/v1/implementations/flashinfer-cublaslt-fp4-e2m1-scaled-mm-n4096-k2048?include=source"interfacepython
revisionda915083d4c7
symbolrun
pathmain.py
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesint8
Benchmark evidence
3 measurements across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
Reported · How evidence levels are derived →
Source and license
sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:ea6b49b7f81bfbd432e22570f1e9b2a0eee9e25b4300a14fcd293ea10e93b67a
license declaredApache-2.0
license concludedApache-2.0
authorsbaseline
imported2026-08-16
Kernel source
main.py19 lines
import torch
from torchao.prototype.mx_formats.utils import to_blocked
def run(A_fp4, B_fp4):
# cuBLASLt unscaled FP4 GEMM via torch._scaled_mm with all-ones (1.0) block scales.
m = A_fp4.shape[0]
k = A_fp4.shape[1] * 2
n = B_fp4.shape[0]
dev = A_fp4.device
a_blk = to_blocked(torch.ones(m, k // 16, device=dev, dtype=torch.float8_e4m3fn))
b_blk = to_blocked(torch.ones(n, k // 16, device=dev, dtype=torch.float8_e4m3fn))
out = torch._scaled_mm(
A_fp4.view(torch.float4_e2m1fn_x2),
B_fp4.view(torch.float4_e2m1fn_x2).T,
a_blk, b_blk, out_dtype=torch.bfloat16,
)
return out
Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0
Best evidence level for this revision: reported
JSON