# MegaOps: A Kernel Overlapping Framework with PyTorch-like Modularity and Megakernel Performance

DevFeed: [MegaOps: A Kernel Overlapping Framework with PyTorch-like Modularity and Megakernel Performance](<https://devfeed.tech/articles/megaops-a-kernel-overlapping-framework-with-pytorch-like-modularity-and-megakernel-performance-131544.md>)

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

Author: Jinkun Lin, Byungsoo Oh, Rachee Singh

Published: 2026-11-13T05:00:00Z

Content type: article

Language: en

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

Topics: [Code Modularity](<https://devfeed.tech/topics/code-modularity.md>), [PyTorch](<https://devfeed.tech/topics/pytorch.md>), [Multi-GPU](<https://devfeed.tech/topics/multi-gpu.md>)

Tags: [a100](<https://devfeed.tech/tags/a100.md>), [abstract](<https://devfeed.tech/tags/abstract.md>), [arxiv](<https://devfeed.tech/tags/arxiv.md>), [best](<https://devfeed.tech/tags/best.md>), [blocks](<https://devfeed.tech/tags/blocks.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [cause](<https://devfeed.tech/tags/cause.md>), [communication](<https://devfeed.tech/tags/communication.md>), [compose](<https://devfeed.tech/tags/compose.md>), [consumer](<https://devfeed.tech/tags/consumer.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cublas](<https://devfeed.tech/tags/cublas.md>), [cuda](<https://devfeed.tech/tags/cuda.md>), [framework](<https://devfeed.tech/tags/framework.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [like](<https://devfeed.tech/tags/like.md>), [modularity](<https://devfeed.tech/tags/modularity.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pytorch](<https://devfeed.tech/tags/pytorch.md>), [with](<https://devfeed.tech/tags/with.md>)

## AI overview

MegaOps aims to retain kernel-per-operator modularity while removing whole-kernel dependency barriers. It launches dependent kernels on separate CUDA streams and synchronizes on individual intermediate-tensor tiles, allowing kernels with matching data tilings to be composed without modifying them. On dense Llama3 and Qwen3 across single H100, A100, and L40 GPUs and multi-GPU servers, the authors report throughput matching hand-tuned ThunderKittens megakernels; against the best-performing baseline, decode throughput is 1.09-1.10x and prefill throughput 0.98-1.10x. The framework reuses existing Triton, cuBLAS, and cuDNN kernels.

## Source excerpt

arXiv:2611.16248v1 Announce Type: new Abstract: Modern ML frameworks execute models using the kernel-per-operator paradigm, which runs each operator as a separate GPU kernel. This paradigm is modular, since developers can compose various kernel implementations and profile each kernel in isolation. However, this paradigm enforces dependencies at the granularity of entire kernels, which places a barrier between dependent kernels. These barriers cause streaming multiprocessors to idle, serialize computation and communication, and prevent a kernel from prefetching its weights while the preceding kernel runs. Megakernels remove kernel barriers by fusing the operators of an entire layer or model into a single kernel, but they give up the modularity of the kernel-per-operator paradigm. In this work, we ask whether a kernel-per-operator ML framework can perform on par with megakernels. Our key insight is that removing kernel barriers does not require fusing kernels. We develop MegaOps, a framework that launches dependent kernels on separate CUDA streams and enforces each dependency on individual tiles of the intermediate tensor that the producer kernel writes and the consumer kernel reads. Since kernels synchronize on data tiles instead of on each other's thread blocks, any two kernels that adopt the same data tiling can be composed without modifying either kernel. We evaluate MegaOps on dense Llama3 and Qwen3 models on single H100, A100, and L40 GPUs and on multi-GPU servers with 4$\times$A100 and 8$\times$H100. Our MegaOps framework matches the throughput of hand-tuned ThunderKittens megakernels, and achieves 1.09$\times$-1.10$\times$ the decode throughput and 0.98$\times$-1.10$\times$ the prefill throughput of the best-performing baseline, while reusing existing Triton, cuBLAS, and cuDNN kernels.