gpt-5-2025-08-07 / cuda69e4ed
gpt-5-2025-08-07_cuda_69e4ed · gpt-5-2025-08-07 · cuda · Apache-2.0
Use it
Vendorable · source mirrored · Apache-2.0View source →
No package. Vendor the mirrored source: 36 lines, Apache-2.0, pinned at da91508.
main.cpp
curl "https://kernelindex.com/api/v1/implementations/flashinfer-gpt-5-2025-08-07-cuda-69e4ed?include=source"interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesfp16
Benchmark evidence
25 measurements across 1 GPU, fastest first.
Operation / workload
Hardware
Latency
Rank
Observed
Show all 25 measurements ›Showing all 25 measurements ⌄
Reproduction-ready · How evidence levels are derived →
Source and license
sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:f6607605a4e8fd48e74c3686e49f2137fe945e624b1349d14c2e421a10dec3cd
license declaredApache-2.0
license concludedApache-2.0
authorsgpt-5-2025-08-07
imported2026-08-20
Kernel source
main.cpp36 lines
#include "kernel.h"
#include <torch/extension.h>
#include <ATen/cuda/CUDAContext.h>
torch::Tensor run(torch::Tensor A, torch::Tensor B) {
TORCH_CHECK(A.is_cuda(), "A must be a CUDA tensor");
TORCH_CHECK(B.is_cuda(), "B must be a CUDA tensor");
TORCH_CHECK(A.dtype() == torch::kHalf, "A must be float16 (half)");
TORCH_CHECK(B.dtype() == torch::kHalf, "B must be float16 (half)");
TORCH_CHECK(A.dim() == 2, "A must be 2D [M, K]");
TORCH_CHECK(B.dim() == 2, "B must be 2D [N, K]");
// Enforce expected shapes
TORCH_CHECK(A.size(1) == K_CONST, "A.shape[1] must be 2048");
TORCH_CHECK(B.size(0) == N_CONST && B.size(1) == K_CONST, "B.shape must be [128, 2048]");
// Ensure contiguous
auto A_c = A.contiguous();
auto B_c = B.contiguous();
// Allocate output C [M, 128] on same device/dtype as A
auto options = A.options();
auto M = A_c.size(0);
auto C = torch::empty({M, static_cast<long>(N_CONST)}, options);
// Launch kernel
launch_gemm_n128_k2048(A_c, B_c, C);
// Return result tensor
return C;
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("run", &run, "gemm_n128_k2048 (A[M,2048], B[128,2048]) -> C[M,128]",
py::arg("A"), py::arg("B"));
}scrolls · 36 lines total
Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0
Best evidence level for this revision: reproducible
JSON