PolyGraph: Plan-Buffered CUDA Graphs for Adaptive Speculative Decoding
Paper · https://arxiv.org/abs/2610.23861
arXiv:2610.23861v1 Announce Type: new Abstract: Adaptive speculative decoding changes the active batch size B and draft length d from one decode step to the next, whereas a CUDA Graph replays a fixed launch configuration. The resulting verification width M = B d forces serving systems to pre-capture many shapes, capture new ones on the serving path, or pad every step to the largest draft. We present PolyGraph, a plan-buffer mechanism for custom Triton kernels that avoids this choice. PolyGraph captures one maximum-grid graph and writes the active shape to GPU memory before each replay. Kernels skip tiles beyond that shape, while graph topology, allocations, layouts, pointers, and launch grids remain fixed; the update transfers only 28 bytes. On one NVIDIA H800, a trace-driven prototype with Qwen2.5-3B dimensions replaces 64 shape-specific graphs with one, matches the warmed baseline in observed step latency (17.7 vs. 17.8 ms P50), and reduces measured pre-serving graph-build time from 3,915 to 93 ms. Fixed-draft controls show that the benefit comes from avoiding padded payload: the P99 difference from MaxPad is negligible at zero padding waste but reaches an 18.7% reduction at 100% waste. Our evidence establishes a bounded work-shape mechanism for custom kernels, not a production serving system, and is limited to synthetic traces on one GPU.
First seen by Oriel on .
AI summary
PolyGraph enables adaptive speculative decoding with one maximum-grid CUDA Graph, matching warmed latency while sharply reducing graph-build time and avoiding padding waste.
- PolyGraph writes the active batch size and draft length to GPU memory before replay, transferring only 28 bytes while keeping graph structure fixed.
- Kernels skip tiles outside the active verification shape, while allocations, layouts, pointers, and launch grids remain unchanged.
- On one NVIDIA H800, PolyGraph replaced 64 shape-specific graphs and reduced measured pre-serving graph-build time from 3,915 to 93 ms.
- With Qwen2.5-3B dimensions, observed step latency was 17.7 ms P50 versus 17.8 ms for the warmed baseline.
- The evaluation used synthetic traces on one GPU and presents a custom-kernel mechanism rather than a production serving system.
#cuda graphs #speculative decoding #triton #gpu kernels
Generated by gpt-5.6-sol. Check the original for details.
Aliases
| Source | External ID | URL |
|---|---|---|
| arXiv AI Papers | oai:arXiv.org:2610.23861v1 | https://arxiv.org/abs/2610.23861 Read discussion |