cuda_sparse_fp4_fp8_naive_n2048_k2048
FlashInfer-Bench baselines · cuda · Apache-2.0
Kernel source · 19 lines ↓holds 2 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.cpp
curl "https://kernelindex.com/api/v1/implementations/flashinfer-cuda-sparse-fp4-fp8-naive-n2048-k2048?include=source"interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp8_e4m3, int8
Benchmark evidence
2 measurements across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
Reproduction-ready · How evidence levels are derived →
Source and license
sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:043fafa17bcadbac63e41a2b63a269b361834f77691e1d476fcd9812519573a5
license declaredApache-2.0
license concludedApache-2.0
authorsbaseline
imported2026-08-16
Kernel source
main.cpp19 lines
#include "kernel.h"
#include <torch/extension.h>
torch::Tensor run(torch::Tensor A_vals, torch::Tensor A_meta, torch::Tensor B_fp8) {
TORCH_CHECK(A_vals.is_cuda(), "cuda only");
auto Av = A_vals.contiguous();
auto Am = A_meta.contiguous();
auto B = B_fp8.contiguous();
const auto M = Av.size(0);
const auto N = B.size(0);
auto C = torch::empty({M, N}, torch::dtype(at::kBFloat16).device(Av.device()));
launch_sparse_fp4_fp8(Av, Am, B, C);
return C;
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("run", &run, "2:4 sparse FP4xFP8 GEMM", py::arg("A_vals"), py::arg("A_meta"), py::arg("B_fp8"));
}
Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0
Best evidence level for this revision: reproducible
JSON