Skip to content
KernelIndex
Search⌘K

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
RMSNorm h512bf16 · [512] · batch_size=18
NVIDIA B200
9.32µs
#6 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=64
NVIDIA B200
9.41µs
#6 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=1
NVIDIA B200
9.48µs
#6 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=32
NVIDIA B200
9.49µs
#7 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=7
NVIDIA B200
9.73µs
#7 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=539
NVIDIA B200
11.8µs
#7 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=11949
NVIDIA B200
55.4µs
#7 of 7
2025-10-16
RMSNorm h512bf16 · [512] · batch_size=14521
NVIDIA B200
64.7µs
#7 of 7
2025-10-16

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