Skip to content
KernelIndex
Search⌘K

gpt-5 / cuda1ad912

gpt-5_cuda_1ad912 · 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-cuda-1ad912?include=source"
interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
measured onNVIDIA B200
declared hardwareNVIDIA B200
architecturessm_100
dtypesbf16

Benchmark evidence

14 measurements across 1 GPU, fastest first.

Operation / workload
Hardware
Latency
Rank
Observed
RMSNorm h128bf16 · [128] · batch_size=24
NVIDIA B200
6.17µs
#1 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=4
NVIDIA B200
6.17µs
#1 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=32
NVIDIA B200
6.18µs
#1= of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=316
NVIDIA B200
6.18µs
#1 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=256
NVIDIA B200
6.19µs
#4 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=192
NVIDIA B200
6.19µs
#3 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=136
NVIDIA B200
6.23µs
#5 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=1088
NVIDIA B200
6.83µs
#7 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=2048
NVIDIA B200
8.15µs
#5 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=2528
NVIDIA B200
8.21µs
#7 of 9
2025-10-16
Show all 14 measurements ›
RMSNorm h128bf16 · [128] · batch_size=49532
NVIDIA B200
32.7µs
#6 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=65016
NVIDIA B200
40.9µs
#7 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=396256
NVIDIA B200
211.8µs
#6 of 9
2025-10-16
RMSNorm h128bf16 · [128] · batch_size=520128
NVIDIA B200
276.3µs
#7 of 9
2025-10-16

Reproduction-ready · How evidence levels are derived →

Source and license

sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:52ddfa19472f47bb9f52314df0d13e707ea930a589cc0ce2ca3f23593e3ed53e
license declaredApache-2.0
license concludedApache-2.0
authorsgpt-5-2025-08-07
imported2026-08-20

Kernel source

main.cpp36 lines
#include <torch/extension.h>
#include <ATen/cuda/CUDAContext.h>
#include "kernel.h"

// Typed implementation
static torch::Tensor run_impl(torch::Tensor hidden_states, torch::Tensor weight) {
    return rmsnorm_h128::rmsnorm(hidden_states, weight);
}

// Python-facing wrapper that handles args and kwargs
static torch::Tensor run_py(pybind11::args args, pybind11::kwargs kwargs) {
    torch::Tensor hidden_states;
    torch::Tensor weight;

    if (args.size() >= 2) {
        hidden_states = args[0].cast<torch::Tensor>();
        weight = args[1].cast<torch::Tensor>();
    } else {
        if (kwargs.contains("hidden_states")) {
            hidden_states = kwargs["hidden_states"].cast<torch::Tensor>();
        } else {
            throw std::invalid_argument("Missing required argument: hidden_states");
        }
        if (kwargs.contains("weight")) {
            weight = kwargs["weight"].cast<torch::Tensor>();
        } else {
            throw std::invalid_argument("Missing required argument: weight");
        }
    }

    return run_impl(hidden_states, weight);
}

PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
    m.def("run", &run_py, "RMSNorm H=128 (BF16) optimized CUDA kernel");
}
scrolls · 36 lines total

Source code from FlashInfer-Bench (flashinfer-ai/flashinfer-trace) · Apache-2.0

Best evidence level for this revision: reproducible

JSON