gpt-o3 / cuda3def09
gpt-o3_cuda_3def09 · gpt-o3 · cuda · Apache-2.0
Use it
Vendorable · source mirrored · Apache-2.0View source →
No package. Vendor the mirrored source: 41 lines, Apache-2.0, pinned at da91508.
main.cpp
curl "https://kernelindex.com/api/v1/implementations/flashinfer-gpt-o3-cuda-3def09?include=source"interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesbf16
Benchmark evidence
7 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:c7d1bd33236079fcca6ebc9ce4f1622b6d13c7955e00cad72d5f79387f66c0bc
license declaredApache-2.0
license concludedApache-2.0
authorsgpt-o3
imported2026-08-20
Kernel source
main.cpp41 lines
#include "kernel.h"
#include <torch/extension.h>
/*
* Python-facing entry point.
* It validates inputs, allocates the output tensor and
* dispatches to the CUDA launcher.
*/
torch::Tensor run(torch::Tensor hidden_states,
torch::Tensor residual,
torch::Tensor weight)
{
// Ensures the tensors live on the same device / stream
TORCH_CHECK(hidden_states.is_cuda(), "hidden_states must be CUDA");
TORCH_CHECK(residual.is_cuda() , "residual must be CUDA");
TORCH_CHECK(weight.is_cuda() , "weight must be CUDA");
TORCH_CHECK(hidden_states.dtype() == at::kBFloat16,
"hidden_states must be BF16");
TORCH_CHECK(residual.dtype() == at::kBFloat16,
"residual must be BF16");
TORCH_CHECK(weight.dtype() == at::kBFloat16,
"weight must be BF16");
// Output – same shape/dtype/device as hidden_states
auto output = torch::empty_like(hidden_states);
// Launch CUDA kernel
fused_add_rmsnorm_h2048(hidden_states, residual, weight, output);
return output;
}
/* ------------------------------------------------------------------ */
/* PyBind11 registration */
/* ------------------------------------------------------------------ */
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def("run", &run,
"Fused Add + RMSNorm (hidden_size = 2048, BF16, B200-optimised)");
}scrolls · 41 lines total
Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0
Best evidence level for this revision: reproducible
JSON