Model or dataset
BytedTsinghua-SIA/CUDA-Agent avatar
BytedTsinghua-SIA/CUDA-Agent

CUDA-Agent: CUDA Kernel Agent Workspace and Dataset

CUDA Agent: Large-Scale Agentic RL for High-Performance CUDA Kernel Generation

1,344 stars139 forksPythonLicense varies

At a glance

What is it?
CUDA-Agent is a research repository for agentic reinforcement learning applied to CUDA kernel generation. It provides a structured workspace for compilation, correctness checks, profiling, and iteration, plus a 6,000-sample operator dataset, while model installation remains undocumented.
Who is it for?
Researchers studying reinforcement-learning-driven CUDA generation can use CUDA-Agent-Ops-6K and `agent_workdir` to inspect task construction and the agent loop. Projects expecting a documented model-installation path, inference API, supported hardware matrix, or production CUDA optimizer should not adopt it as a finished tool.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 107 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What CUDA-Agent Targets

CUDA-Agent targets the difficult loop between writing a CUDA kernel and proving that the result is both correct and faster than an existing PyTorch implementation. Its intended users are researchers working on large-scale agentic reinforcement learning, CUDA code generation, operator optimization, and training data for LLM-based systems. The project also has practical value for engineers who want to inspect the environment used for such experiments, although the README describes that environment more clearly than it describes a general-purpose kernel optimizer.

The README presents CUDA-Agent as an RL-trained model for high-performance CUDA kernel generation. It says the system surpasses models such as Claude Opus 4.6 and Gemini 3 Pro on KernelBench, and that it consistently outperforms the `torch.compile` baseline across difficulty levels, with larger gains on the hardest cases. These are project-reported results, not independently reproduced findings here. The repository has no GitHub releases, so users should not assume that it provides a packaged release with stable installation artifacts.

The `agent_workdir` Compilation and Profiling Loop

The repository layout centers on `agent_workdir`, a standardized workspace whose stated loop is implementation, compilation, correctness verification, performance profiling, and iteration. That sequence gives an agent concrete operational stages instead of treating generated CUDA source as finished output. The custom implementation belongs in `model_new.py`, while `model.py` supplies the original PyTorch baseline. CUDA and C++ sources live under `kernels/`, with `binding.cpp` and `binding_registry.h` providing shared Python binding registration.

The supporting utilities map directly to the loop. `utils/compile.py` and `utils/compile.sh` build the extension, `utils/verification.py` checks correctness, and `utils/profiling.py` compares performance with the baseline and `torch.compile`. `SKILL.md` records workflow constraints and optimization rules for agent execution. This context is useful because it tells an agent which artifacts it may change and which checks are expected after a change.

The README does not explain how an agent controller is invoked, how reinforcement-learning inference connects to this directory, or whether an agent automatically selects and applies edits. The visible repository entries establish a workspace and its scripts, not a complete execution interface for the trained model.

A First `agent_workdir` Iteration

The README does not provide installation instructions, dependency versions, CUDA requirements, or a documented command for loading a trained checkpoint. It identifies `agent_workdir` as the workspace to use and says that its common commands run from inside that directory. Based on the repository layout, the first operational pass is to place the intended PyTorch task in `model.py`, implement the custom extension path in `model_new.py` and `kernels/`, then build before invoking either validation script.

Run the documented build script from `agent_workdir`. A successful build would prepare the custom extension for the verification and profiling steps, although the README does not define the exact success output.

bash
bash utils/compile.sh

After compilation, run the correctness script. The README identifies this as validation of the custom kernel against the baseline, but it does not publish its tolerance policy, test cases, exit codes, or expected console output.

bash
python3 -m utils.verification

After correctness passes, use the documented performance command. `utils/profiling.py` is described as comparing the optimized model with the baseline and `torch.compile`, which makes it the relevant first measurement step for this workspace.

bash
python3 -m utils.profiling

These three commands are not a complete installation guide. The README gives no documented commands for fetching the repository, creating a Python environment, installing PyTorch or a compiler toolchain, or downloading model weights.

How CUDA-Agent-Ops-6K Was Constructed

The released `CUDA-Agent-Ops-6K` dataset contains 6,000 training samples. According to the README, its pipeline begins with reference operators collected from `torch` and `transformers`. An LLM then composes multiple operators into fused tasks. This creates compound optimization tasks rather than isolated operator translations, which matches the project's emphasis on performance-oriented CUDA generation.

The pipeline applies rule-based filtering. A retained sample must execute correctly in both eager mode and `torch.compile`. Stochastic operators and degenerate outputs are removed. Construction also controls runtime and rejects samples that are highly similar to KernelBench tests to reduce contamination risk. Those rules make the dataset less dependent on random behavior and more suitable for repeated correctness checks, but they also define a boundary. A task rejected as stochastic, degenerate, excessively long-running, or too similar to a benchmark test will not appear in the released set.

The README links the dataset on Hugging Face as `BytedTsinghua-SIA/CUDA-Agent-Ops-6K`. It does not document the dataset schema, splits, licensing, exact runtime thresholds, similarity thresholds, or download code. Those details must be checked on the dataset page before training.

Correctness and Performance Boundaries

CUDA-Agent's clearest engineering constraint is that correctness and speed are separate gates. The dataset requires eager and compiled PyTorch executions to succeed, while the workspace provides a dedicated verification stage before profiling. That separation is sensible because a fast kernel that changes numerical results is not a successful optimization. It also means the workflow cannot be reduced to timing output alone.

The comparison baseline is specific. `utils/profiling.py` is described as comparing against the original model and `torch.compile`, rather than only comparing two hand-written kernels. This narrows the evaluation context but does not establish that either baseline is the best available implementation for every operator. A generated kernel can also be correct for one input shape and incorrect for another. The README does not explain whether `utils/verification.py` checks multiple shapes, random inputs, numerical tolerances, race conditions, or memory errors.

The project is the wrong tool when an organization needs a documented, general CUDA optimization service with predictable hardware support. It is also insufficient on its own for production deployment decisions based only on the README, because it provides no inference API, model-weight distribution instructions, supported GPU list, or release history.

CUDA-Agent Versus Direct PyTorch Custom Extensions

A direct CUDA custom-extension workflow usually begins with a known operator, implements its host and device code, compiles it, validates it against PyTorch, and profiles it. CUDA-Agent follows that basic structure but adds an agent-oriented workspace and places the generated result within `model_new.py`, binding files, kernels, and reusable verification and profiling scripts. The main difference is therefore not the low-level CUDA mechanism. It is the surrounding workflow for an agent that can make and evaluate successive code changes.

For one engineer optimizing one known operator, the agent framework may add more moving parts than necessary. The README provides `SKILL.md`, shared binding infrastructure, and several task-oriented files, but it does not document a standalone API for requesting an optimization. For research into training or evaluating an RL-driven coding agent, the dataset, explicit stages, baseline references, and optimization rules provide more relevant structure than a plain source template.

This distinction matters when reviewing the repository. CUDA-Agent should not be described merely as a CUDA library. Its clearest assets are the training corpus and the structured experimentation workspace.

Maintenance, Releases, and License Status

The repository is not archived, and its last push was on 2026-07-08. That indicates recent repository activity, but the project has no GitHub releases. There is consequently no release cadence, changelog, or stable package version to cite. The last push date and absence of releases should be kept separate: recent repository activity does not establish a versioned maintenance commitment.

The repository license is listed as unknown, and the README does not state licensing terms for the code, dataset, paper assets, or generated material. This matters for both research reuse and commercial evaluation. A missing or unclear repository license can prevent redistribution or incorporation into another codebase until the owner clarifies the terms. The dataset page may contain separate information, but no such terms are documented in the README.

Upgrade planning is also limited. With no releases or compatibility statement, changing CUDA, PyTorch, compiler, or GPU environments may require manual inspection of `utils/compile.py`, `utils/compile.sh`, and the binding code rather than following a published upgrade path.

Editorial conclusion

Researchers studying reinforcement-learning-driven CUDA generation can use CUDA-Agent-Ops-6K and `agent_workdir` to inspect task construction and the agent loop. Projects expecting a documented model-installation path, inference API, supported hardware matrix, or production CUDA optimizer should not adopt it as a finished tool. First verify the repository license, the contents of `agent_workdir`, and whether its documented scripts work in the intended CUDA and PyTorch environment.

Frequently asked questions

How do I install and run CUDA-Agent?

The README does not document installation of the trained model or its dependencies. It says to run `bash utils/compile.sh`, `python3 -m utils.verification`, and `python3 -m utils.profiling` from inside `agent_workdir`.

What does the CUDA-Agent-Ops-6K dataset contain?

The dataset contains 6,000 training samples built from reference operators collected from `torch` and `transformers`. An LLM composes multiple operators into fused tasks, after which rule-based filters require correct eager and `torch.compile` execution and remove unsuitable samples.

Does CUDA-Agent provide a trained model or inference API?

The README describes CUDA-Agent as an RL-trained model, but its repository entries and documented commands cover the dataset and `agent_workdir`, not model installation, checkpoint loading, inference, or an API.

Official sources

  1. BytedTsinghua-SIA/CUDA-Agent on GitHub
  2. Issues
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/bytedtsinghua-sia-cuda-agent.svg)](https://hysenlabs.com/projects/bytedtsinghua-sia-cuda-agent)

Was this useful?