benchmark-kernel

Benchmark FlashInfer kernel performance across backends using CUPTI timing.

4|2|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill benchmark-kernel-drunkcoding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: benchmark-kernel
Source: https://github.com/drunkcoding/AgentSkillsArxiv/tree/main/skills/flashinfer/benchmark-kernel
Command: npx skills add https://github.com/drunkcoding/AgentSkillsArxiv --skill benchmark-kernel-drunkcoding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates accurate benchmarking of FlashInfer kernels to measure GPU execution times across backends.

Core Features & Use Cases

  • CUPTI-based timing for hardware-level accuracy (with CUDA events as fallback)
  • Compare multiple kernel routines across backends (Attention, GEMM, MOE)
  • Generate reproducible results with CSV outputs and example command lines

Quick Start

Run the flashinfer benchmark suite to compare kernel backends across workloads.

Frequently Asked Questions about benchmark-kernel

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I benchmark FlashInfer kernel performance with CUPTI timing?

You can benchmark FlashInfer kernels by applying CUPTI Python to measure hardware-level GPU execution times across routines like Attention, GEMM, and MOE. The tool generates reproducible CSV outputs and example command lines for comparison.

What is the best way to measure accurate GPU execution times for FlashInfer kernels?

Measuring accurate GPU execution times for FlashInfer kernels requires CUPTI-based timing to capture hardware-level performance. This approach compares multiple kernel backends across workloads like BatchDecodeWithPagedKVCacheWrapper and bmm_fp8 with high precision.

Do I need CUPTI Python to run FlashInfer benchmarks?

CUPTI Python is required for hardware-level timing accuracy with CUDA toolkit support, but the benchmarking process automatically falls back to CUDA events if CUPTI is unavailable on your system.

Can I compare multiple FlashInfer backends for Attention and MOE workloads?

Comparing multiple FlashInfer backends for workloads like Attention, GEMM, and MOE is supported by running the benchmark suite across specific test cases such as trtllm_fp8_block_scale_moe. It produces reproducible results to evaluate runtimes and throughput.

How does CUPTI timing work for GPU kernel benchmarking?

CUPTI timing works by capturing hardware-level GPU execution times during kernel benchmarking, providing higher accuracy than software timers. It enables direct comparison of runtimes and throughput across different FlashInfer backends.

What are the limitations of using CUDA events fallback for FlashInfer benchmarking?

The CUDA events fallback activates when CUPTI is unavailable, allowing FlashInfer benchmarking to proceed but without the same hardware-level timing accuracy. Use CUPTI Python with the CUDA toolkit for the most precise GPU execution measurements.