KernelArc: A Multi-Agent Framework for GPU Kernel Optimization
KernelArc is a multi-agent framework that autonomously optimizes GPU kernels through parallel, strategy-specialized agents coordinating via shared memory and deterministic guards, achieving top rankings on the SOL-ExecBench leaderboard for diverse workloads on NVIDIA H100 and B200 GPUs.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Modern computers rely on specialized chips called graphics processing units, or GPUs, to handle the massive calculations required by artificial intelligence. These chips are incredibly powerful, but they are also complex machines with many different parts that must work in perfect sync. To get the most out of them, engineers must write tiny, highly specific programs called kernels that tell the chip exactly how to move data and perform math. For years, this has been a job for human experts who spend countless hours tweaking code, balancing memory use, and timing operations to squeeze out every bit of speed. As these chips have grown more sophisticated, the manual work has become harder, and the gap between what the hardware can do and what the software achieves has widened.
Researchers have begun using large language models—computer programs trained on vast amounts of text—to help write and improve this code. These models can suggest changes, test them, and learn from the results, acting like an automated engineer. However, a single automated agent often gets stuck. It might find a good solution and keep polishing it, missing other, better approaches that lie in a different direction. It is like a hiker who finds a nice path up a mountain and keeps walking up it, never realizing that a different trail nearby leads to a much higher peak. To solve this, a team of researchers at IMEC has developed a new system called KernelArc, which uses a group of these automated agents working together to explore many different paths at once.
The KernelArc system operates by assigning different strategies to several agents running in parallel. Instead of one agent trying to solve a problem alone, each agent in the group focuses on a different angle of attack, such as changing how data is stored, altering the mathematical precision used, or fusing multiple steps into one. These agents do not share their entire thought process or every step they take, which would be too messy and confusing. Instead, they share only their final conclusions: what worked and what failed. They write these results into a shared memory space that acts like a bulletin board. If one agent discovers a trick that speeds up a calculation, it posts the result. Other agents can read this post and use the insight to guide their own work, avoiding dead ends and building on success.
To ensure that the agents do not waste time on broken code, the system includes a strict, automated referee. This referee runs every new code suggestion through a series of tests to check if it is correct and how fast it is. If a suggestion fails the test, it is discarded immediately. If it works but is not faster than the current best version, it is kept as a backup but does not replace the leader. Only when a new version is both correct and faster does it become the new standard. This process allows the team of agents to explore a wide range of possibilities without getting lost in the details of every single attempt. The system also has a safety mechanism that kicks in if an agent gets stuck on a plateau, where no further improvements can be found. When this happens, the system forces the agent to try a completely different approach, ensuring the search continues to move forward.
The researchers tested this system on two of the most advanced GPUs available, the NVIDIA H100 and the B200. They focused on a set of standard tasks used to measure performance, which include operations like matrix multiplication, attention mechanisms used in language models, and various forms of data fusion. In one specific test involving a single agent working alone with a detailed guide, the system managed to reach a speed of 766 teraflops, which is about 3.2 percent faster than the best existing library for that specific task. This showed that a single agent could go very deep into a specific problem if given a clear path. However, when the researchers switched to the multi-agent KernelArc system to tackle a broader set of tasks, the results were even more impressive. The system produced custom implementations for various complex operations, including specialized attention mechanisms and fused layers for large language models.
On a public leaderboard that ranks the speed of these operations across many different shapes and sizes of data, the KernelArc submissions took first place in several categories. For one task involving attention and residual addition, a single agent got stuck at a performance score of 0.441. The multi-agent system, by sharing insights and exploring different directions, broke through that barrier and reached a score of 0.481. In another test involving a complex attention task, the multi-agent system achieved a speedup of nearly 291 times compared to a standard reference implementation, and over 143 times faster than a highly optimized baseline. These results suggest that having multiple agents share their findings allows the system to find better solutions faster than a single agent working alone, especially when the problem space is large and varied.
The study also looked at how the system behaves when the number of agents and the amount of shared memory change. They found that giving the agents a shared memory where they could post their successes and failures helped them reach stronger results within a fixed number of attempts. When the memory was unlimited, the system performed the best, reaching a speedup of over 290 times compared to the starting point. This indicates that the ability to learn from the collective experience of the group is a key factor in success. The researchers noted that the value of each feature, such as the shared memory or the strategy specialization, depends on the specific task and the stage of the search. Sometimes the agents need to explore broadly, and other times they need to refine a specific solution.
This work does not claim to have solved all problems in computer optimization, nor does it suggest that human engineers are no longer needed. The results are specific to the tasks and hardware tested, and the system still relies on a human-designed framework to guide the agents. However, the findings demonstrate that a coordinated group of automated agents can explore a wider range of solutions than a single agent. By sharing only their most valuable conclusions, these agents can avoid repeating mistakes and build on each other's discoveries. This approach offers a promising way to handle the increasing complexity of modern computing, where the gap between hardware potential and software performance continues to grow. The system shows that with the right coordination, automated tools can help unlock the full power of the chips that drive the next generation of artificial intelligence.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.