FlashInfer is a library and kernel generator that supplies GPU operations used to run large language model inference, including attention, matrix multiplication, and mixture-of-experts computations. It helps engineers build and optimize LLM serving systems across supported GPU hardware and backend implementations. Its catalogue add-ons provide skills and instructions for working with FlashInfer.
Borrowing it
Nothing to install: this file belongs to flashinfer-ai/flashinfer. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/flashinfer-ai/flashinfer/main/.claude/skills/benchmark-kernel/SKILL.mdgit clone --depth 1 https://github.com/flashinfer-ai/flashinferWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/flashinfer-ai/flashinfer/benchmark-kernel)<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/benchmark-kernel"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/benchmark-kernel/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/flashinfer-ai/flashinfer/benchmark-kernel"><img src="https://agentmods.dev/badge/skills/flashinfer-ai/flashinfer/benchmark-kernel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Privilege Escalation · line 293 Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00014 | $0.03616 |
| Opus 5.5 | $0.00006 | $0.01446 |
| Sonnet 5.5 | $0.00003 | $0.00723 |
| Haiku 4.5 | $0.00001 | $0.00362 |
Grade B, and why
benchmark-kernel scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
sudo nvidia-smi -lgc <base_clock> How it starts
The opening of the file, as written. The whole thing — 433 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tutorial: Benchmarking FlashInfer Kernels
This tutorial shows you how to accurately benchmark FlashInfer kernels.
Goal
Measure the performance of FlashInfer kernels:
- Get accurate GPU kernel execution time
- Compare multiple backends (FlashAttention2/3, cuDNN, CUTLASS, TensorRT-LLM)
- Generate reproducible benchmark results
- Save results to CSV for analysis
Timing Methods
FlashInfer supports two timing methods:
-
CUPTI (Preferred): Hardware-level profiling for most accurate GPU kernel time
- Measures pure GPU compute time without host-device overhead
- Requires
cupti-python >= 13.0.0(CUDA 13+)
-
CUDA Events (Fallback): Standard CUDA event timing
- Automatically used if CUPTI is not available
- Good accuracy, slight overhead from host synchronization
The framework automatically uses CUPTI if available, otherwise falls back to CUDA events.
Autotuner timing (separate from the benchmark framework above). The
AutoTuner's internal per-tactic timing has its own selector,FLASHINFER_AUTOTUNE_TIMER:globaltimerforces the GPU%globaltimerregister,cuda_eventforcescudaEvent, and unset/auto uses%globaltimeronly when Confidential Computing (CC) is detected. Under CCcudaEventElapsedTimeis unreliable (can go negative), which would corrupt tactic ranking — the globaltimer path avoids that. CC auto-detection can be overridden withFLASHINFER_CONFIDENTIAL_COMPUTE=0/1. (Full env-var reference inCLAUDE.md.)
Installation
Install CUPTI (Recommended)
For the most accurate benchmarking:
pip install -U cupti-python
Requirements: CUDA 13+ (CUPTI version 13+)
Without CUPTI
If you don't install CUPTI, the framework will:
- Print a warning:
CUPTI is not installed. Falling back to CUDA events. - Automatically use CUDA events for timing
- Still provide good benchmark results
Method 1: Using flashinfer_benchmark.py (Recommended)
Step 1: Choose Your Test Routine
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed 67b34f50f2e5
- 1mo ago First seen · 433 lines · 14 tokens per session scan B 597917dae005
benchmark-kernel is a skill published in the GitHub repository flashinfer-ai/flashinfer (6,763 stars, last pushed today), licensed Apache-2.0. It adds 14 tokens to every session and 3,616 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
gpu-server-setup
Prepare a Linux server with NVIDIA or Intel Arc GPUs for neural-network and LLM workloads, or diagnose one that misbehaves. Use when the user asks to set up or prepare a GPU server, install NVIDIA drivers or CUDA on Debian/Ubuntu, bring up Intel Arc (A770, A750, B580, Arc Pro B60/B70) with the i915/xe driver and…
cuopt-skill-evolution
After solving a non-trivial problem, detect generalizable learnings and propose skill updates. Always active — applies to every interaction.
cuopt-developer
Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.
cuopt-user-rules
Base rules for end users calling NVIDIA cuOpt (routing/LP/MILP/QP/install/server). Not for cuOpt internals — use cuopt-developer for those.
perf-optimize
Launch and operate this repo's perf-optimize workflow, which iteratively APPLIES TensorRT-LLM serving optimizations — baseline benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill) sizing the headroom the…
perf-analyze
Launch and operate this repo's perf-analyze workflow, which DIAGNOSES a TensorRT-LLM serving deployment without applying changes — benchmark at one concurrency or a Pareto curve of them (tok/s/user vs tok/s/gpu), analytical SOL projection on by default (via the internal-perf-sol-analysis skill), nsys + ncu per-kernel…