# One Megakernel is Not Enough: Predicting Where to Cut for Streaming Inference

DevFeed: [One Megakernel is Not Enough: Predicting Where to Cut for Streaming Inference](<https://devfeed.tech/articles/one-megakernel-is-not-enough-predicting-where-to-cut-for-streaming-inference-101632.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.35336>)

Author: Aditya Chatterjee, Anand Joseph X M, Sanjay Singh Chauhan

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [Streaming](<https://devfeed.tech/topics/streaming.md>), [TensorRT-LLM](<https://devfeed.tech/topics/tensorrt-llm.md>), [Real-time AI interactions](<https://devfeed.tech/topics/real-time-ai-interactions.md>)

Tags: [abstract](<https://devfeed.tech/tags/abstract.md>), [batch](<https://devfeed.tech/tags/batch.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [composition](<https://devfeed.tech/tags/composition.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cs-pf](<https://devfeed.tech/tags/cs-pf.md>), [execution](<https://devfeed.tech/tags/execution.md>), [framework](<https://devfeed.tech/tags/framework.md>), [fusion](<https://devfeed.tech/tags/fusion.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [graph](<https://devfeed.tech/tags/graph.md>), [inference](<https://devfeed.tech/tags/inference.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [latency](<https://devfeed.tech/tags/latency.md>), [llama](<https://devfeed.tech/tags/llama.md>), [megakernels](<https://devfeed.tech/tags/megakernels.md>), [model](<https://devfeed.tech/tags/model.md>), [monolith](<https://devfeed.tech/tags/monolith.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [throughput](<https://devfeed.tech/tags/throughput.md>), [time](<https://devfeed.tech/tags/time.md>)

## AI overview

The paper proposes selecting streaming-inference megakernel boundaries from conventional-graph profiles and standalone kernel benchmarks, simulating candidate tile and event graphs instead of testing each design end to end. In 13 tested model and batch-size combinations, the selected design matched the measured best; across NH-TTS, Qwen3-TTS and Llama-1B, the best ranged from two to four megakernels or fully conventional execution, never a single monolith. For NH-TTS on an H100 NVL at batch size 32, three specialized megakernels improved mean batch-p95 time to first audio by 21.4% and throughput by 28% versus the evaluated monolith, and improved engine-level mean batch TTFA p95 by 4.05x and throughput by 19.7% versus conventional TensorRT graph execution. The excerpt also identifies four categories describing how preferred compositions change with batch size.

## Source excerpt

arXiv:2610.35336v1 Announce Type: cross Abstract: We address a fundamental question: How far should kernel fusion extend and which boundaries are worth preserving? Unlike the general convention of using one monolith megakernel at lower batch sizes or supporting only a selective model component as megakernel and rest of the model as conventional graph, we show that the best configuration is a composition of multiple megakernels with no overlapping conventional graph component, or a fully conventional graph. We present a framework that selects megakernel regions in a streaming inference model from conventional-graph profiles and standalone kernel benchmarks, without running any candidate design end to end. It simulates each candidate's tile and event graphs to predict time to first output and selects the measured best design in all 13 combinations of model and batch size we tested. Across NH-TTS, Qwen3-TTS and Llama-1B, the best composition ranges from two to four megakernels to fully conventional execution and none is a single megakernel. We introduce four model categories (megakernel-stable/ receding/ advancing/ averse) that capture how a model's best megakernel composition changes with batch size. Using NH-TTS model on H100 NVL GPU, we demonstrate that preserving three specialized megakernels can improve both latency and throughput despite introducing additional kernel boundaries. At batch size 32, this design delivers 21.4% lower mean batch-p95 time to first audio (TTFA) and 28% higher throughput than the evaluated monolith megakernel. Against conventional TensorRT graph execution, it reduces engine-level mean batch TTFA p95 by 4.05x and increases throughput by 19.7%.