Skip to content

[Agents] Add Triton kernel-writing skill - #55019

Merged
WoosukKwon merged 4 commits into
mainfrom
woosuk/kernel-skill
Sep 2, 2026
Merged

WoosukKwon merged 4 commits into
mainfrom
woosuk/kernel-skill

Conversation

@WoosukKwon

@WoosukKwon WoosukKwon commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a concise, repository-local Triton kernel-writing skill.
  • Cover generated-code inspection, tuning and specialization choices, launch-grid limits, 64-bit offsets, read-after-write synchronization, and decode-versus-prefill tiling.
  • Require representative shape sweeps and numerically difficult correctness inputs.

Duplicate-work check

Open PR searches for Triton kernel skill, agent skill Triton, kernel-writing, triton-kernel-writing, and Triton Kernel Writing found no PR addressing this change. There is no linked issue.

This is materially different from closed PR #55009. That PR imported and adapted a much larger TensorRT-LLM skill under kernel-triton-writing, including provenance and reference documents. This PR instead adds a clean, focused, vLLM-specific skill under triton-kernel-writing with only the guidance requested here and no imported content.

Testing

  • .venv/bin/python /home/woosuk/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/triton-kernel-writing — passed.
  • .venv/bin/pre-commit run --files .agents/skills/triton-kernel-writing/SKILL.md .agents/skills/triton-kernel-writing/agents/openai.yaml — all applicable hooks passed.

Model evaluation

Not applicable. This adds agent guidance only and does not change model output, accuracy, or serving behavior.

AI assistance and accountability

OpenAI Codex assisted with drafting and validating this change. The human submitter must review every changed line and understand and defend the contribution end-to-end.

Summary by CodeRabbit

  • Documentation
    • Added guidance for writing and reviewing Triton kernels, covering implementation practices, launch configuration, indexing, synchronization, data types, boundary validation, benchmarking, and compilation overhead.
    • Added recommendations for avoiding unintended runtime compilation and accounting for compilation and autotuning costs during performance evaluation.
    • Added agent guidance that helps apply these recommendations when implementing or reviewing Triton kernels, with clear metadata and default instructions.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: ef26d8f3-39f1-46b1-a05d-0e00d2e021aa

📥 Commits

Reviewing files that changed from the base of the PR and between 4813ef4 and 754d69a.

📒 Files selected for processing (1)
  • .agents/skills/triton-kernel-writing/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .agents/skills/triton-kernel-writing/SKILL.md

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

This change adds a triton-kernel-writing skill for vLLM. It documents Triton implementation, launch, indexing, and validation practices. An OpenAI agent configuration exposes the skill with display metadata and a default prompt.

Changes

Triton kernel skill

Layer / File(s) Summary
Skill definition and agent wiring
.agents/skills/triton-kernel-writing/SKILL.md, .agents/skills/triton-kernel-writing/agents/openai.yaml
The skill defines Triton kernel-writing guidance. The agent configuration provides display metadata and a default prompt.
Kernel implementation guidance
.agents/skills/triton-kernel-writing/SKILL.md
The implementation guidance covers Triton semantics, generated-code inspection, compile-time controls, specialization behavior, and tl.debug_barrier() for write-then-read patterns.
Launch, indexing, and validation guidance
.agents/skills/triton-kernel-writing/SKILL.md
The skill documents grid limits, int64 offset arithmetic, decode and prefill mapping, boundary checks, dtype selection, benchmark sweeps, and compilation overhead reporting.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 754d6

This change adds repository-local Triton kernel-writing guidance without changing runtime or serving behavior, and no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a Triton kernel-writing skill for agents.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch woosuk/kernel-skill

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

WoosukKwon and others added 2 commits September 2, 2026 21:55
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon WoosukKwon added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 2, 2026
@WoosukKwon WoosukKwon changed the title [Agents] Add concise Triton kernel-writing skill [Agents] Add Triton kernel-writing skill Sep 2, 2026
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #86951 for commit 754d69a2a391.

@WoosukKwon
WoosukKwon merged commit cf3263d into main Sep 2, 2026
23 of 24 checks passed
@WoosukKwon
WoosukKwon deleted the woosuk/kernel-skill branch September 2, 2026 22:29
mylibrar pushed a commit to tanyuqian/vllm that referenced this pull request Sep 3, 2026
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: OpenAI Codex <codex@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants