gpt-o3 / cudaefa360
gpt-o3_cuda_efa360 · gpt-o3 · cuda · Apache-2.0
Use it
Vendorable · source mirrored · Apache-2.0View source →
No package. Vendor the mirrored source: 49 lines, Apache-2.0, pinned at da91508.
main.cpp
curl "https://kernelindex.com/api/v1/implementations/flashinfer-gpt-o3-cuda-efa360?include=source"interfacecuda
revisionda915083d4c7
symbolrun
pathmain.cpp
Compatibility
declared hardwareNVIDIA B200
architecturessm_100
dtypesbf16, fp32, fp8_e4m3, int32
Benchmark evidence
No published measurement for this revision.
No evidence · How evidence levels are derived →
Source and license
sourcehttps://huggingface.co/datasets/flashinfer-ai/flashinfer-trace
commitda915083d4c7c5e61aa3005e3d17ae488e0fc71c
revision digestsha256:1d7e5372db19f65c323c44f364c6aaad4bd415502583abef4f649ed52af4d47f
license declaredApache-2.0
license concludedApache-2.0
authorsgpt-o3
imported2026-08-20
Kernel source
main.cpp49 lines
#include "kernel.h"
#include <torch/extension.h>
/*
* Python-visible front-end
*
* python: run(… tensors …,
* local_expert_offset : int,
* routed_scaling_factor : float) -> bf16 tensor
*/
torch::Tensor run(torch::Tensor routing_logits,
torch::Tensor routing_bias,
torch::Tensor hidden_states,
torch::Tensor hidden_states_scale,
torch::Tensor gemm1_weights,
torch::Tensor gemm1_weights_scale,
torch::Tensor gemm2_weights,
torch::Tensor gemm2_weights_scale,
int32_t local_expert_offset,
double routed_scaling_factor)
{
TORCH_CHECK(routing_logits.is_cuda(), "all inputs must be CUDA tensors");
const int T = hidden_states.size(0);
auto out = torch::empty({T, HIDDEN_SIZE},
torch::TensorOptions()
.dtype(torch::kBFloat16)
.device(hidden_states.device()));
moe_forward_cuda(routing_logits,
routing_bias,
hidden_states,
hidden_states_scale,
gemm1_weights,
gemm1_weights_scale,
gemm2_weights,
gemm2_weights_scale,
local_expert_offset,
static_cast<float>(routed_scaling_factor),
out);
return out;
}
PYBIND11_MODULE(TORCH_EXTENSION_NAME, m)
{
m.def("run", &run,
"MoE FP8 block-scale forward – B200-optimised");
}scrolls · 49 lines total
Source code from the importing source · Apache-2.0
No published measurement for this revision
JSON