Skip to content
Back to search

kernel-design-agents

Kernel Design Agents (KDA) is a agent-centric workflow to write high-performance CUDA Kernels.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mit-han-lab--kernel-design-agents/badge.svg)](/listings/mit-han-lab--kernel-design-agents)

HTML

<a href="/listings/mit-han-lab--kernel-design-agents"><img src="/api/listings/mit-han-lab--kernel-design-agents/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Install the agent workflow dependencies before starting the agent session:

git clone --recurse-submodules https://github.com/mit-han-lab/kernel-design-agents.git
cd kernel-design-agents

# link skills
mkdir -p ~/.claude/skills
ln -s "$(pwd)/skills/ncu-report-skill" ~/.claude/skills/ncu-report-skill
ln -s "$(pwd)/skills/KernelWiki" ~/.claude/skills/KernelWiki

# or clone the independently licensed ncu skill directly
mkdir -p ~/.claude/skills && cd ~/.claude/skills
git clone https://github.com/mit-han-lab/ncu-report-skill.git

Use KernelWiki from this repository's pinned submodule. A direct upstream checkout may contain artifact snapshots governed by additional terms that are omitted from this distribution.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 103 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Kernel Design Agents
  2. Kernel Design Agents (KDA) is an agent-centric workflow for using coding agents to research, implement, verify, and iterate on performance-sensitive CUDA kernel tasks.
  3. This repository documents an early research prototype and remains under active development. Community feedback and contributions are welcome. If you are interested in HAN Lab Mafia's solutions ranking #1–3 on tracks at the MLSys Kernel Contest, see [mit-han-lab/mlsys2026-flashinfer-contest](https://github.com/mit-han-lab/mlsys2026-flashinfer-contest) for performance evaluation and reproduction.
  4. ## Contents
  5. | Path | Purpose |
  6. |---|---|
  7. | `docs/agent-flow.md` | Minimal end-to-end KDA workflow. |
  8. | `prompts/README.md` | How to use prompt templates. |
  9. | `prompts/basic-flow.md` | Generic starter prompt for a new task. |
  10. | `CLAUDE.md` | Repository-facing agent instructions. |
  11. | `CONTRIBUTING.md` | Contribution process and DCO sign-off requirements. |
  12. | `THIRD_PARTY_NOTICES.md` | Third-party component and license disclosures. |
  13. | `third_party_licenses/` | Verbatim upstream license files for distributed third-party components. |
  14. ## Community Kernel Wishlist
  15. Have a kernel that needs optimization? [Submit a request](https://github.com/NVlabs/kda/tree/wishlist#submit) directly as a pull request to `wishlist`, with a reproducible definition, representative workloads, and your best-known baseline implementation. No issue is required. The community wishlist currently supports NVIDIA B200 and B300 GPUs only.
  16. [Browse and upvote requests](https://github.com/NVlabs/kda/pulls?q=is%3Apr%20base%3Awishlist), [discuss an idea](https://github.com/NVlabs/kda/issues/new?title=%5Bwishlist%5D%20) if you need help preparing the files, or visit the [project website](https://nvlabs.github.io/kda/). Keep request details in `requests/<github-username>-<kernel-name>/README.md` and use the [wishlist PR template](.github/PULL_REQUEST_TEMPLATE/wishlist.md) for the short description. Merging records the request, while optimization progress and result links remain on the original pull request. Website source lives on `pages`; the PR template and issue chooser settings are maintained on `main`.
  17. ## Getting Started
  18. Install the agent workflow dependencies before starting the agent session:
  19. ```bash
  20. git clone --recurse-submodules https://github.com/mit-han-lab/kernel-design-agents.git
  21. cd kernel-design-agents
  22. # link skills
  23. mkdir -p ~/.claude/skills
  24. ln -s "$(pwd)/skills/ncu-report-skill" ~/.claude/skills/ncu-report-skill
  25. ln -s "$(pwd)/skills/KernelWiki" ~/.claude/skills/KernelWiki
  26. # or clone the independently licensed ncu skill directly
  27. mkdir -p ~/.claude/skills && cd ~/.claude/skills
  28. git clone https://github.com/mit-han-lab/ncu-report-skill.git
  29. ```
  30. Use KernelWiki from this repository's pinned submodule. A direct upstream
  31. checkout may contain artifact snapshots governed by additional terms that are
  32. omitted from this distribution.
  33. ## Submodules
  34. The following third-party projects are included as Git submodules. The source URLs and revisions below are intentional and match the gitlinks recorded in this repository.
  35. | Path | Source | Pinned revision | License |
  36. |---|---|---|---|
  37. | `skills/KernelWiki` | [mit-han-lab/KernelWiki](https://github.com/mit-han-lab/KernelWiki.git) | Based on [`76d27b56f804e7e7295d4c570e1e5d7eef4b0a75`](https://github.com/mit-han-lab/KernelWiki/commit/76d27b56f804e7e7295d4c570e1e5d7eef4b0a75), with the repository-maintained release sanitization recorded by the gitlink | MIT for original material; embedded artifacts retain their upstream terms; restricted CuTe DSL artifacts are omitted |
  38. | `skills/ncu-report-skill` | [mit-han-lab/ncu-report-skill](https://github.com/mit-han-lab/ncu-report-skill.git) | [`d1887948c7d53690cfe6605f59c1329b8a1c6bb5`](https://github.com/mit-han-lab/ncu-report-skill/commit/d1887948c7d53690cfe6605f59c1329b8a1c6bb5) | MIT |
  39. These submodules are not covered by this repository's first-party license. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for the applicable license text and additional details.
  40. Install the `humanize` Claude Code plugin from the Claude Code plugin UI:
  41. ```text
  42. /plugin marketplace add PolyArch/humanize
  43. /plugin install humanize@PolyArch
  44. ```
  45. ## Minimal Flow
  46. 1. Create a separate implementation workspace for the target task.
  47. 2. Define the task contract: objective, constraints, validation command, and promotion criteria.
  48. 3. Start an agent session in the implementation workspace.
  49. 4. Give the agent `prompts/basic-flow.md`, filled in with the task-specific details.
  50. 5. Ask the agent to write a short plan draft to `docs/draft.md` in the implementation workspace.
  51. 6. Convert the draft into an executable plan, either manually or with a planning tool such as Humanize.
  52. 7. Implement in small iterations, verifying after each meaningful change.
  53. 8. Record candidates, benchmark or evaluation results, profiling evidence, and final promotion decisions.
  54. The workflow is intentionally independent of any single benchmark harness or hardware target. A downstream task can add its own evaluator, datasets, profiling tools, and domain-specific references.
  55. Validated CuTe candidates can be [exported as Hugging Face kernels](docs/huggingface-export.md).
  56. ## Recommended Workspace Layout
  57. Use this repository as reference material, then do implementation work elsewhere:
  58. ```text
  59. task-workspace/
  60. docs/
  61. draft.md
  62. plan.md
  63. runs/
  64. outputs/
  65. profile/
  66. benchmark.csv
  67. candidates.jsonl
  68. ```
  69. The exact files can change by domain. The important rule is that the agent records enough context for another engineer to understand what was tried, what passed validation, and why the final candidate was selected.
  70. ## Contributing
  71. This project accepts outside contributions under the Developer Certificate of Origin process. See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request.
  72. ## License
  73. Except for the third-party submodules identified above, first-party documentation, prompts, skills-style content, and assets are licensed under the [Creative Commons Attribution 4.0 International License](LICENSE), and first-party source code is licensed under the [Apache License 2.0](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.