From cf3263d571dfa21e82787356b9506cbf80b68ad6 Mon Sep 17 00:00:00 2001 From: Woosuk Kwon Date: Wed, 2 Sep 2026 15:29:16 -0700 Subject: [PATCH] [Agents] Add Triton kernel-writing skill (#55019) Signed-off-by: Woosuk Kwon Co-authored-by: OpenAI Codex --- .agents/skills/triton-kernel-writing/SKILL.md | 62 +++++++++++++++++++ .../triton-kernel-writing/agents/openai.yaml | 4 ++ 2 files changed, 66 insertions(+) create mode 100644 .agents/skills/triton-kernel-writing/SKILL.md create mode 100644 .agents/skills/triton-kernel-writing/agents/openai.yaml diff --git a/.agents/skills/triton-kernel-writing/SKILL.md b/.agents/skills/triton-kernel-writing/SKILL.md new file mode 100644 index 0000000000..6dd6a8520b --- /dev/null +++ b/.agents/skills/triton-kernel-writing/SKILL.md @@ -0,0 +1,62 @@ +--- +name: triton-kernel-writing +description: Write or review Triton kernels for vLLM, with practical guidance for generated-code inspection, launch grids, indexing, specialization, tuning, and representative performance validation. +--- + +# Triton Kernel Writing + +## Implementation + +- Follow the official + [Triton semantics](https://triton-lang.org/main/python-api/triton-semantics.html). + Check it when behavior may differ from Python or NumPy, especially type + promotion, integer division and modulo, casts, broadcasting, and variable + scoping. +- Use the Triton kernel generated by `torch.compile` as a possible + implementation to inspect. Print Inductor's generated code with + `TORCH_LOGS="output_code" .venv/bin/python