Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Autonomous GPU Kernel Generation & Optimization via Deep Agents
| Date | Stars |
|---|---|
| 2026-07-31 | 492 |
| 2026-08-04 | 498 |
| 2026-08-06 | 498 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# KernelAgent — Multi‑Agent GPU Kernel Synthesis and Optimization
KernelAgent turns PyTorch programs into verified Triton kernels and optimize its performance. It was designed around KernelBench workloads and combines:
- Static problem analysis to decide whether to run a lightweight path or a full pipeline
- LLM‑assisted refactoring that isolates fusable subgraphs
- Parallel Triton kernel generation with strict runtime verification
- End‑to‑end composition that rebuilds the original forward pass using only the synthesized kernels
- Hardware‑guided optimization pipeline that iteratively improves performance
GPU Kernel Synthesis Blog post: [PyTorch KernelFalcon](https://pytorch.org/blog/kernelfalcon-autonomous-gpu-kernel-generation-via-deep-agents/)
GPU Kernel Optimization Blog post: [PyTorch KernelAgent](https://pytorch.org/blog/kernelagent-hardware-guided-gpu-kernel-optimization-via-multi-agent-orchestration/)
## Kernel Generation Pipeline Overview

Every stage writes artifacts to a run directory under `.fuse/<run_id>/`, including the fused PyTorch code, `subgraphs.json`, individual KernelAgent sessions, and the final `compose_out/composed_kernel.py`.
## KernelAgent Multi-Worker Optimization Pipeline Overview

Every stage writes artifacts to a run directory under `.optimize/<run_id>/`, including the input Triton kernel, artifacts, individual optimization worker sessions, and the final `output/best_kernel.py`.
## Quickstart
### Requirements
- Python 3.8 – 3.12
- Linux or macOS
- **GPU Requirements (one of the following):**
- **CUDA**: NVIDIA GPU with CUDA support
- **XPU**: Intel GPU with oneAPI support (Arc, Data Center GPUs, or integrated Xe graphics)
- Triton (installed separately: `pip install triton` or nightly from source)
- PyTorch (https://pytorch.org/get-started/locally/)
- LLM provider ([OpenAI](https://openai.com/api/), [Anthropic](https://www.anthropic.com/), or a self-hosted relay)
### Install
```bash
pip install -e .
```
### Platform-Specific PyTorch Installation
#### Intel XPU (Intel GPUs)
```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/xpu
```
**Note:** Intel XPU support requires:
- Compatible Intel GPU (Arc series, Data Center GPUs, or integrated Xe graphics)
- Linux with appropriate Intel GPU drivers
Verify your XPU installation:
```python
import torch
print(torch.xpu.is_available()) # Should print True
print(torch.xpu.device_count()) # Number of Intel GPUs
```
#### (Optional) Install KernelBench for problem examples
```bash
git clone https://github.com/ScalingIntelligence/KernelBench.git
```
Note: By default, KernelAgent UI searches for KernelBench at the same level as `KernelAgent`. (i.e. `../KernelBench`)
### Configure
You can export keys directly or use an `.env` file that the CLIs load automatically.
```bash
OPENAI_MODEL=gpt-5 # default model for extraction
NUM_KERNEL_SEEDS=4 # parallel workers per kernel
MAX_REFINEMENT_ROUNDS=10 # retry budget per worker
LOG_LEVEL=INFO # logging level
```
#### LLM Providers
KernelAgent currently supports OpenAI and Anthropic out-of-the-box. You can also use a custom OpenAI endpoint.
These can be configured in `.env` or via environment variables.
```bash
# OpenAI (models like `o4-mini`, `gpt-5`)
OPENAI_API_KEY=sk-...
# Anthropic (default; `claude-sonnet-4-20250514` is used when `OPENAI_MODEL` is unset)
ANTHROPIC_API_KEY=sk-ant-...
# Relay configuration for self-hosted gateways
LLM_RELAY_URL=http://127.0.0.1:11434
LLM_RELAY_TIMEOUT_S=120
```
More knobs live in `triton_kernel_agent/agent.py` and `Fuser/config.py`.
## End-to-End Kernel Generation Workflows
- **Auto-route a KernelBench problem** — static analysis picks between the direct KernelAgent path and the full Fuser pipeline, with automatic fallback if the first attempt fails:
```bash
python -m Fuser.auto_agent \
--problem /absExcerpt of 14,105 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:86ff0775bfcf086d, llm:Repository description: 'Autonomous GPU Kernel Generation & Optimization via Deep Agents' (meta-pytorch/KernelAgent).
matched fp:86ff0775bfcf086d, llm:Repository description: 'Autonomous GPU Kernel Generation & Optimization via Deep Agents' (meta-pytorch/KernelAgent).
matched fp:86ff0775bfcf086d, llm:Repository description: 'Autonomous GPU Kernel Generation & Optimization via Deep Agents' (meta-pytorch/KernelAgent).