---
title: "KernelEvolve: How Meta’s Ranking Engineer Agent Optimizes AI Infrastructure"
description: "KernelEvolve is Meta's agentic kernel-authoring system that treats kernel optimization as a search problem instead of one-shot LLM code generation."
url: "https://swe.quest/articles/kernelevolve-how-meta-s-ranking-engineer-agent-optimizes-ai-infrastructure-d31b329bdf84a06a"
canonical: "https://engineering.fb.com/2026/04/02/developer-tools/kernelevolve-how-metas-ranking-engineer-agent-optimizes-ai-infrastructure/"
source: "Meta Engineering"
published: "2026-04-02"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 14
tags: ["ai-agents","performance","hardware","compilers","recommendation-systems"]
---

# KernelEvolve: How Meta’s Ranking Engineer Agent Optimizes AI Infrastructure

A post on [Meta Engineering](https://swe.quest/sources/meta.md), published 2026-04-02, 14 min read, Deep dive. Original: [https://engineering.fb.com/2026/04/02/developer-tools/kernelevolve-how-metas-ranking-engineer-agent-optimizes-ai-infrastructure/](https://engineering.fb.com/2026/04/02/developer-tools/kernelevolve-how-metas-ranking-engineer-agent-optimizes-ai-infrastructure/)

## Summary

KernelEvolve is Meta's agentic kernel-authoring system that treats kernel optimization as a search problem instead of one-shot LLM code generation. Monte Carlo tree search and evolutionary strategies explore hundreds of candidate kernels across Triton, CuTe DSL, FlyDSL, CUDA, HIP and MTIA C++. Nodes use configurable memory operators that draw on parent, sibling or no history. A retrieval-augmented, self-updating knowledge base supplies hardware documentation and distilled optimization skills, and an evaluation harness (TritonBench, PyTorch Profiler, NCU, Proton, MTIA Insight) feeds diagnoses of memory-bound, compute-bound or occupancy limits back to the LLM. Results include over 60% inference throughput gain for the Andromeda ads model on NVIDIA GPUs and over 25% training throughput gain on MTIA, achieved in hours rather than weeks of expert tuning.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)
- [Recommendations & ranking](https://swe.quest/tags/recommendation-systems.md) (AI & ML)

## Prerequisites

- GPU kernel programming ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))
- Triton or CUDA basics
- LLM agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- recommendation model operators

## Keywords

KernelEvolve, MTIA, Triton, CUDA, Monte Carlo tree search, TritonBench, Andromeda, ISCA 2026

## Related posts

- [From CUDA to MLX: How K-Search Brings Decades of Kernel Expertise to Apple Silicon](https://swe.quest/articles/from-cuda-to-mlx-how-k-search-brings-decades-of-kernel-expertise-to-apple-610eff297d34e6f2.md): Berkeley AI Research · 2026-07-29 · Hard · 11 min read · Inference & serving, Performance engineering, Hardware, AI for coding, LLMs
  K-Search, an LLM-driven evolutionary kernel search framework, was extended with an MLX backend and a structured CUDA-to-MLX translation layer.
- [Beyond Prompting: How Algorithmic Evolution Doubled our Training Speed](https://swe.quest/articles/beyond-prompting-how-algorithmic-evolution-doubled-our-training-speed-3669307c6d5f1431.md): Klarna Engineering · 2026-03-30 · Medium · 7 min read · Model training, Performance engineering, AI for coding, Payments & fintech
  Klarna used Google DeepMind's AlphaEvolve to evolve nearly 6,000 candidate versions of the PyTorch training pipeline for a large transformer trained on payment events.
- [Key research and product announcements at the AI Native Conf](https://swe.quest/articles/key-research-and-product-announcements-at-the-ai-native-conf-07f3b657efde83f0.md): Together AI · 2026-03-05 · Hard · 7 min read · Inference & serving, Hardware, Model training, AI agents, Performance engineering
  Together AI announced seven research and product releases spanning GPU kernels, reinforcement learning infrastructure and inference optimization.
- [Meta introduces its first-generation AI inference accelerator](https://swe.quest/articles/meta-introduces-its-first-generation-ai-inference-accelerator-ada8e18664455a57.md): Meta Engineering · 2023-05-18 · Hard · 8 min read · Hardware, Inference & serving, Recommendations & ranking, Compilers
  MTIA v1 is Meta's first custom inference ASIC for deep learning recommendation models: a TSMC 7nm, 800 MHz, 25 W chip delivering 102.4 INT8 TOPS, built from an 8x8 mesh of processing elements with customized RISC-V cores, fixed-function units, 128 KB local SRAM each, 128 MB shared on-chip SRAM and up to 128 GB LPDDR5.
- [Last year we built megakernels. This year we deleted them: The road to Together Compiler](https://swe.quest/articles/last-year-we-built-megakernels-this-year-we-deleted-them-the-road-to-together-8e97dcf4bda731c8.md): Together AI · 2026-11-16 · Hard · 28 min read · Compilers, Inference & serving, Performance engineering, Hardware
  Megakernels for Llama 1B hit 990 TPS on H100 but were too inflexible to productionize, supporting only one model, batch size and precision.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
