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

[vllm-project/vllm#55009](https://github.com/vllm-project/vllm/pull/55009) · WoosukKwon · CLOSED · created 2026-09-02T19:43:23Z · merged <no value>

## Summary

- Copy and adapt NVIDIA TensorRT-LLM’s Triton kernel-writing skill for vLLM.
- Route correctness work to existing kernel pytest suites and performance work
  to the existing `kernel-microbenchmark` skill.
- Remove copied API catalogs, fixed GPU tuning recipes, unsupported performance
  and tolerance claims, and incomplete kernel examples. Keep a compact workflow
  plus focused semantics and troubleshooting references backed by current
  official Triton documentation.

## Provenance

The initial version of this skill was copied from NVIDIA’s TensorRT-LLM
repository:

<https://github.com/NVIDIA/TensorRT-LLM/tree/main/.claude/skills/kernel-triton-writing>

The imported snapshot is from commit
`395985c025c8d1cf5aa842bc752b337ba88721b6`.

The upstream source is licensed under Apache-2.0. The content in this PR has
since been substantially rewritten for vLLM, and the copied API catalogs and
kernel examples have been removed. The source repository and snapshot commit
remain explicit in the skill and `ORIGIN.md` as historical provenance.

The upstream standalone `verify_kernel.py` and `benchmark_kernel.py` helpers
are intentionally omitted. Their fixed-name export contract is not used by
vLLM, where kernel correctness belongs in existing `tests/kernels/` suites and
performance work follows the `kernel-microbenchmark` skill.

## Duplicate-work check

Open vLLM PR searches for `kernel-triton-writing` and
`Triton kernel writing` returned no matches. There is no linked issue for this
import.

## Testing

- `.venv/bin/pre-commit run --files .agents/skills/kernel-triton-writing/SKILL.md .agents/skills/kernel-triton-writing/ORIGIN.md .agents/skills/kernel-triton-writing/references/semantics.md .agents/skills/kernel-triton-writing/references/troubleshooting.md`
- `.venv/bin/python /home/woosuk/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/kernel-triton-writing`
- Verified that all linked Triton documentation pages return HTTP 200.

All passed.

## Model evaluation

Not applicable. This adds agent guidance and reference documentation; it does
not change model output, accuracy, or serving behavior.

## AI assistance and accountability

AI assistance from OpenAI Codex was used to import, audit, adapt, and validate
this change. The human submitter remains responsible for reviewing every
changed line and understanding and defending the change end-to-end.

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

## Summary by CodeRabbit

- **Documentation**
  - Reorganized the Triton kernel-writing guidance into a concise, six-step workflow covering design, implementation, verification, measurement, and debugging.
  - Added a reference explaining Triton semantics, including masking, broadcasting, numeric behavior, and signed integer division.
  - Condensed troubleshooting guidance into a practical triage and symptom checklist.
  - Updated provenance and clarified the relationship to upstream reference material.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---

## comments

**coderabbitai** (2026-09-02T19:43:56Z):

<!-- 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/55009)

<!-- 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**: `d5f61d2d-cb36-47f0-9a9b-2220d61e8001`

</details>

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

Reviewing files that changed from the base of the PR and between [`71344ae`](https://github.com/aarnphm/aarnphm.github.io/commit/71344ae8bc2f555cb2ab39cfc0dcb88a1140fb29) and [`7459213`](https://github.com/aarnphm/aarnphm.github.io/commit/7459213637477372ea65fd53c2542df5f324084c).

</details>

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

- `.agents/skills/kernel-triton-writing/ORIGIN.md`
- `.agents/skills/kernel-triton-writing/SKILL.md`
- `.agents/skills/kernel-triton-writing/references/semantics.md`
- `.agents/skills/kernel-triton-writing/references/troubleshooting.md`

</details>

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

- .agents/skills/kernel-triton-writing/references/semantics.md
- .agents/skills/kernel-triton-writing/ORIGIN.md
- .agents/skills/kernel-triton-writing/references/troubleshooting.md

</details>

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

</details>

---

<!-- recent_review_end -->

<!-- walkthrough_start -->

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

## Walkthrough

The PR revises the Triton kernel-writing skill for vLLM, removes version-specific examples and tables, adds a Triton semantics reference, and condenses troubleshooting guidance. It also updates provenance statements for the skill and reference documents.

### Changes

**Triton kernel-writing skill**

| Layer / File(s)                                                                                                                                                                                                                                                            | Summary                                                                                                                                                                                                                                                                                              |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **vLLM kernel-writing workflow** <br> `.agents/skills/kernel-triton-writing/SKILL.md`                                                                                                                                                                                      | The skill now covers fit confirmation, contract-driven design, implementation, correctness verification, measurement, debugging, and authoritative references. It removes detailed kernel skeletons, error tables, fixed tolerance values, tuning recipes, and pointer-derived random seed guidance. |
| **Triton APIs and semantics** <br> `.agents/skills/kernel-triton-writing/references/semantics.md`                                                                                                                                                                          | Adds guidance for Triton grids, shapes, masks, broadcasting, masked access, numeric promotion, precision, and signed integer division.                                                                                                                                                               |
| **Debugging and benchmark guidance** <br> `.agents/skills/kernel-triton-writing/references/troubleshooting.md`                                                                                                                                                             | Replaces detailed troubleshooting sections with a triage order, built-in debugging tools, a symptom checklist, and a microbenchmark pointer.                                                                                                                                                         |
| **Source provenance updates** <br> `.agents/skills/kernel-triton-writing/ORIGIN.md`, `.agents/skills/kernel-triton-writing/SKILL.md`, `.agents/skills/kernel-triton-writing/references/semantics.md`, `.agents/skills/kernel-triton-writing/references/troubleshooting.md` | Updates source, license, attribution, and rewrite statements for the skill and its references.                                                                                                                                                                                                       |

**Estimated code review effort:** 2 (Simple) | \~10 minutes

<!-- final_review_risk_start -->

**Merge Risk:** _🟡 Moderate_ · up to `74592`

<!-- final_review_risk_coverage:{"sourceCommitId":"7459213637477372ea65fd53c2542df5f324084c","coveredCommitId":"7459213637477372ea65fd53c2542df5f324084c","kind":"reviewed"} -->

This PR adds Triton kernel-writing guidance, but several current passages still describe unsafe or incorrect masking, dtype, shape, synchronization, attention, routing, and validation behavior. The change does not modify serving code, yet the guidance could lead contributors to implement incorrect kernels, so merge requires fixes or explicit owner acceptance.

<!-- 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 identifies the main change: importing and adapting the Triton kernel-writing skill from TensorRT-LLM.                                                                                   |
|     Docstring Coverage     | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. (4 skipped: 4 … |
|     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**

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. (4 skipped: 4 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/triton-kernel-skills`

</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=55009)! 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 -->

