---
title: '55019'
pageLayout: default
slug: thoughts/inference/vllm-prs/55019
permalink: https://aarnphm.xyz/thoughts/inference/vllm-prs/55019.md
generator:
  quartz: v4.6.0
  hostedProvider: Cloudflare
  baseUrl: aarnphm.xyz
full: https://aarnphm.xyz/llms-full.txt
---
# [#55019](https://github.com/aarnphm/aarnphm.github.io/issues/55019) \[Agents\] Add Triton kernel-writing skill

[vllm-project/vllm#55019](https://github.com/vllm-project/vllm/pull/55019) · WoosukKwon · MERGED · created 2026-09-02T21:54:05Z · merged 2026-09-02T22:29:17Z

## 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](https://github.com/aarnphm/aarnphm.github.io/issues/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.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## 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.
  <!-- end of auto-generated comment: release notes by coderabbit.ai -->

---

## comments

**coderabbitai** (2026-09-02T21:54:40Z):

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->

<!-- review_stack_entry_start -->

[![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/vllm-project/vllm/pull/55019)

<!-- review_stack_entry_end -->

<!-- recent_review_start -->

No actionable comments were generated in the recent review. 🎉

<details>
<summary>ℹ️ Recent review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Team

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

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between [`4813ef4`](https://github.com/aarnphm/aarnphm.github.io/commit/4813ef41aa88fc665fe2f6edd094e42f1f826eed) and [`754d69a`](https://github.com/aarnphm/aarnphm.github.io/commit/754d69a2a391186e10e13e9a7fdd3f9887897f1b).

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

- `.agents/skills/triton-kernel-writing/SKILL.md`

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

- .agents/skills/triton-kernel-writing/SKILL.md

</details>

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

</details>

---

<!-- recent_review_end -->

<!-- walkthrough_start -->

<details>
<summary>📝 Walkthrough</summary>

## 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** <br> `.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** <br> `.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** <br> `.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

<!-- final_review_risk_start -->

**Merge Risk:** _⚪ Minimal_ · up to `754d6`

<!-- final_review_risk_coverage:{"sourceCommitId":"754d69a2a391186e10e13e9a7fdd3f9887897f1b","coveredCommitId":"754d69a2a391186e10e13e9a7fdd3f9887897f1b","kind":"reviewed"} -->

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

<!-- final_review_risk_end -->

</details>

<!-- walkthrough_end -->

<!-- pre_merge_checks_walkthrough_start -->

<details>
<summary>🚥 Pre-merge checks | ✅ 5</summary>

<details>
<summary>✅ Passed checks (5 passed)</summary>

|         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.                                                                                                                                  |

</details>

<details>
<summary>Full details: Docstring Coverage</summary>

**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.)

</details>

</details>

<!-- pre_merge_checks_walkthrough_end -->

<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

<details>
<summary>🧪 Generate unit tests (beta)</summary>

- [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Create PR with unit tests
- [ ] <!-- {"checkboxId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} -->   Commit unit tests in branch `woosuk/kernel-skill`

</details>

</details>

<!-- finishing_touch_checkbox_end -->

<!-- tips_start -->

---

Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss\&utm_medium=github\&utm_campaign=vllm-project/vllm\&utm_content=55019)! It’s free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A\&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit\&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai\&mini=true\&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit\&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<sub>Comment `@coderabbitai help` to get the list of available commands.</sub>

<!-- tips_end -->

**WoosukKwon** (2026-09-02T22:09:55Z):

/ci run

**github-actions** (2026-09-02T22:10:18Z):

✅ Triggered [Buildkite CI #86951](https://buildkite.com/vllm/ci/builds/86951) for commit `754d69a2a391`.

