gpt-o3 / cudaa1fa19
gpt-o3_cuda_a1fa19 · gpt-o3 · cuda · Apache-2.0
Use it
Vendorable · source mirrored · Apache-2.0View source →
No package. Vendor the mirrored source: 44 lines, Apache-2.0, pinned at da91508.
main.cpp
curl "https://kernelindex.com/api/v1/implementations/flashinfer-gpt-o3-cuda-a1fa19?include=source"interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesbf16
Benchmark evidence
8 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:13a126d0a3661cf52b34ed0e27e1b1f7e445116cb018260a4dc62103333e5780
license declaredApache-2.0
license concludedApache-2.0
authorsgpt-o3
imported2026-08-20
Kernel source
main.cpp44 lines
#include "kernel.h"
#include <torch/extension.h>
#include <pybind11/pybind11.h>
/*
* Python entry point:
*
* output = run(hidden_states : bf16[batch,512],
* weight : bf16[512],
* **kwargs) # kwargs ignored
*/
torch::Tensor run(torch::Tensor hidden_states,
torch::Tensor weight,
pybind11::kwargs /*kwargs*/ = {})
{
TORCH_CHECK(hidden_states.device().is_cuda(),
"hidden_states must be on a CUDA device.");
TORCH_CHECK(weight.device().is_cuda(),
"weight must be on a CUDA device.");
/* Ensure contiguous layout (becomes a no-op if already contiguous) */
auto hidden_c = hidden_states.contiguous();
auto weight_c = weight.contiguous();
/* Allocate output tensor */
auto output = torch::empty_like(hidden_c);
/* Launch CUDA kernel */
rmsnorm_h512_cuda(hidden_c, weight_c, output);
return output;
}
/* ------------------------------ pybind11 ---------------------------------- */
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
{
m.def("run",
&run,
pybind11::arg("hidden_states"),
pybind11::arg("weight"),
pybind11::kw_only(),
"Optimised RMSNorm kernel (hidden_size = 512, bf16, B200)");
}scrolls · 44 lines total
Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0
Best evidence level for this revision: reproducible
JSON