﻿# TokenSpeed-Kernel: portable operator APIs and the MI355X benchmark boundary

Separate TokenSpeed-Kernel dispatch, timed attention work and whole-serving throughput before transferring its Gluon-versus-Triton gains to another GPU workload.

Author: Retrivium editorial team
Updated: 2026-11-05
Canonical URL: https://retrivium.ai/journal/tokenspeed-kernel-portable-api-mi355x-benchmark-scope/
Language: en

TokenSpeed-Kernel separates the operation an inference engine requests from the hardware-specific implementation that executes it. The same attention or MoE interface can select different backends. For a heterogeneous GPU provider, this is an integration pattern: portability of the call does not imply identical kernels, numerical behavior or performance across accelerators.

## Keep runtime and kernel responsibilities separate

The [PyTorch technical account](https://pytorch.org/blog/lightseek-tokenspeed-kernel/) places model execution and scheduling state in the TokenSpeed runtime, while the kernel layer owns operator interfaces, selection and backend details. Its registry describes supported capabilities and tensor traits before choosing an implementation.

A common interface therefore does not make every operation available on every GPU. For a deployment record, retain the selected implementation alongside the model and tensor formats. A successful package import establishes considerably less than a complete qualified serving path.

## An attention microbenchmark has a specific timer

The reported Gluon attention comparison leads on 14 of 15 measured GPT-OSS prefill shapes on MI355X. The attention figure times kernel calls with HIP events and excludes extra wrapper transformations. Those measurements concern the described operation boundary, rather than complete request latency.

This distinction suggests a useful comparison plan: first inspect whether an operation matches the supported traits; then compare its timing and the serving outcome separately. A faster core operation can coexist with unchanged preparation costs, and a different prompt distribution may exercise shapes outside the published grid.

## Read the serving ratio against its actual baseline

The same account reports 1.6–3.6× output-throughput improvements over TokenSpeed's portable Triton attention-and-MoE path. It uses GPT-OSS-120B on one MI355X, tensor parallel size 1, disabled prefix caching, random prompts and EvalScope. The recorded software environment includes ROCm 7.2.1.

This is a comparison between two configurations of that serving stack. It is not an AMD-versus-NVIDIA ranking, a gain over every competing server or a promise for workloads benefiting from prefix reuse. Preserve the baseline and request population when citing the ratio.

## Current implementation guidance is another revision

The [current kernel README](https://raw.githubusercontent.com/lightseekorg/tokenspeed/main/tokenspeed-kernel/README.md) describes standalone numerical checks, benchmarks, profiling and overrides. It additionally documents an optional prepared plan that keeps selection independent of batch-size re-ranking, and a compilation monitor for changes that trigger JIT work during serving. These current features should not be retroactively treated as the exact configuration of the earlier published measurements.

A proposed pilot records startup preparation and subsequent compilation separately from warmed execution, then checks the intended fallback and numerical acceptance rule. The [kernel-stack comparison guide](/journal/flashinfer-vs-flashattention-kernel-stack/) and [backend acceptance guide](/journal/vllm-attention-backend-acceptance/) explain this qualification process. We reviewed documentation rather than installing kernels or measuring production GPUs; a registry entry is a declared capability, not our independent performance validation.

## Sources

- [PyTorch: TokenSpeed-Kernel design and MI355X measurements](https://pytorch.org/blog/lightseek-tokenspeed-kernel/).
- [Current project kernel README](https://raw.githubusercontent.com/lightseekorg/tokenspeed/main/tokenspeed-kernel/README.md).
