Liger Kernel Perf
linkedin/Liger-Kernel
Optimizes the performance of existing Liger Kernel Triton kernels.
TileLang 算子性能调优与潜在性能劣化模式检查。提供性能数据采集、瓶颈诊断、优化实施、效果验证能力;也用于生成或评审算子时对照常见性能劣化模式示例检查当前 kernel 代码。触发:算子精度通过后需要优化性能、性能不及预期时。
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .claude/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .claude/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .agents/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .agents/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .cursor/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .cursor/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/tile-ai/tilelang-ascend.git --path .agents/skills/tilelang-perf-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .gemini/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .gemini/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .github/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .github/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install tile-ai/tilelang-ascend tilelang-perf-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tile-ai/tilelang-ascend.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/tilelang-perf-optimization .opencode/skills/tilelang-perf-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "tilelang-perf-optimization" agent skill from https://github.com/tile-ai/tilelang-ascend/tree/ascendc_pto/.agents/skills/tilelang-perf-optimization into .opencode/skills/tilelang-perf-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "tilelang-perf-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
tilelang-perf-optimizationTileLang 算子性能调优与潜在性能劣化模式检查。提供性能数据采集、瓶颈诊断、优化实施、效果验证能力;也用于生成或评审算子时对照常见性能劣化模式示例检查当前 kernel 代码。触发:算子精度通过后需要优化性能、性能不及预期时。
Tilelang Perf Optimization is an agent skill from tile-ai/tilelang-ascend. TileLang 算子性能调优与潜在性能劣化模式检查。提供性能数据采集、瓶颈诊断、优化实施、效果验证能力;也用于生成或评审算子时对照常见性能劣化模式示例检查当前 kernel 代码。触发:算子精度通过后需要优化性能、性能不及预期时。
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/best-practices/cube_optimization_path.md`, `references/best-practices/flash_attn_optimize.md` and `references/best-practices/gemm_intrinsic_optimize.md`).
The repository describes itself as: Ascend TileLang adapter. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 83b0ece. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Tilelang Perf Optimization loads about 1.2k tokens when it runs, and up to ~45k if it reads all its reference files. Until then it costs about 36 tokens; SKILL.md has 237 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from tile-ai/tilelang-ascend at commit 83b0ece, republished under its MIT licence (© tile-ai). 237 words, ~1,204 tokens.
.claude/skills/tilelang-perf-optimization/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.Step 1: 基线采集(性能 + 精度)
→ Step 2: 算子类型判断
→ Step 3: 阅读参考文档并识别优化点(输出到 optimization_log.md)
→ Step 4: 逐项实施优化点
→ Step 5: 效果验证(性能 + 精度)msprof op,禁止用 Python/Torch 计时F.pad、.contiguous()、.to(dtype) 等),必须移入 kernel在 examples/{op_name}/ 下查找含 @tilelang.jit 的脚本,运行:
msprof op --kernel-name="main_kernel" --output=./msprof_output python ./examples/{op_name}/<script_name>.py精度未通过 → 禁止后续步骤。
生成翻译后的 Ascend C 代码:
在算子脚本中,JIT 编译返回的函数对象调用 get_kernel_source() 可获取翻译后的 Ascend C 代码:
func = jit_func(batch=B, seq_len=S, ...)
print(func.get_kernel_source())运行脚本后,从输出中搜索关键字判断算子类型:
| 判断依据 | 类型 | 典型算子 |
|---|---|---|
IS_ASCEND_AIC 出现 | Cube 型 | GEMM、MatMul、Linear |
IS_ASCEND_AIV 出现 | Vector 型 | RoPE、Softmax、Add |
| 两者均出现 | 混合型 | FlashAttention、SparseFlashAttention |
先读取 optimization-guide.md 的目录和各章节标题 + performance-antipatterns.md 的各条目标题,根据算子类型(Step 2 判定)和算子实现特征初步筛选出可能适用的优化点清单。再针对每个候选优化点,读取其"适用场景"、"约束"、"使用条件"等描述,确认是否真正适用。如果是 cube 核额外参考 best-practices/cube_optimization_path.md,如果是 vector 核额外参考 vector-practices/ 目录下的文档。
在 optimization_log.md 中输出:
Part A 优化点清单:逐条标注适用/不适用 + 原因 + 参考文件行号。pass_configs 不是独立优化点,是伴随修改。
[#1] [名称](参考: optimization-guide.md L445-L650 §2.13):[适用/不适用] — [原因]若候选会扩大现有 kernel 的调用域(新增 shape、batch、dtype、尾块或多 stage), Part A 必须先写:
[KERNEL-REUSE-PRECHECK]
candidate: <优化点及 reference 章节>
expanded_domain: <新增调用域>
compatibility_dimensions: <从该章节读取,不自行猜测>
unknown_or_false: <none/列表>
plan: direct-reuse / repair-kernel-first / new-kernel-first存在 unknown/false 时,ORDER-PLAN 不得写 direct reuse。
重点:每节都需读取其"适用场景"和"约束"描述确认是否适用。仅当章节标题明确标注了特定算子类型专属(如"Cube 核")且当前算子不属于该类型时,才可初步排除;其余所有章节必须读约束确认,不得仅凭标题或算子类型跳过。
Part B [ORDER-PLAN]:分析依赖关系,排出实施顺序链。依赖分析三条规则:
[ORDER-PLAN] 实施顺序:
1. [#N] [名称] — 前置依赖: [无] — 理由: [...]
2. [#M] [名称] — 前置依赖: [#N] — 理由: [...]固定优先级:先静态分析(对照 performance-antipatterns.md),再 P0 Host 侧优化(optimization-guide.md §2.12)。P0 完成后 Host 侧只允许零拷贝形状变换。
后续优化点按 [ORDER-PLAN] 逐个实施,每个走 6 子步骤:
0: ORDER-CHECK → A: Read 文档 → B: Edit 代码 → C: msprof op 验证 → D: 记录结果 → (失败) E: 重读文档修复门禁:[ORDER-CHECK] 未写禁止 Read;[IMPL-#N] 未写禁止 Edit;[RESULT-#N] 未写禁止下一个。
Edit 调用方、dispatch 或 planner 前,再写 [KERNEL-REUSE-AUDIT] 复核候选章节规定的
兼容性维度。任一项仍为 unknown/false,先修复或新建 kernel,并单独验证后再扩大调用域。
不同优化点使用各自 reference 章节的维度,不套用其他优化的专属字段。
日志格式:
[ORDER-CHECK] 准备实施: [#N] [名称] | 前置依赖: [#1 ✅ / #2 ❌] | 结论: [✅/❌]
[IMPL-#N] 已阅读 <文件> L行号(§X.X),关键约束: ...
[KERNEL-REUSE-AUDIT] 依据: <章节> | 维度及结论: <...> | 结论: <reuse/repair/new>
[SELF-CHECK] 本次 Edit 只涉及 [#N]
[RESULT-#N] 优化点: [名称] | 精度: [pass/fail] | 性能: [X us] | 对比: [+/-X%]Double Buffer 特殊要求:实施前必须完成 [DB-ANALYSIS](Q1: 循环内有 MTE3?Q2: 有跨迭代累加器?Q3: 选同步方式),未完成禁止写代码。
最佳实践参考:
| 算子类型 | 文档 | 核心优化技术 |
|---|---|---|
| Vector 型 | RoPE 优化、归约遍数融合 | NPU 内动态生成 Mask、Tile API 向量化、参数简化 |
| Cube 型 | GEMM Intrinsic | 多缓冲流水线、细粒度 Flag 同步、MMA intrinsic、L0 分块、负载均衡 |
| CV 融合型 | Flash Attention | num_stages 流水线、批量 Softmax、Cross-core Semaphore、数据布局优化;多 shape 适配(BSND 免转置、Sq==1 decode 窄块、加性 mask 屏蔽变长 Skv) |
每个优化点后执行:精度验证 → msprof op → 记录 → 对比基线。精度失败时保持优化调试,不撤销。
调试手段:T.printf、T.dump_tensor、get_kernel_source(),详见 Programming Guide。
迭代终止:达到目标或连续 3 次无提升则中断上报。
保存在 examples/{op_name}/perf_tuning/:
baseline.json - 基线性能optimization_log.md - 优化记录final_report.md - 最终报告© tile-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 8 other files (references) in .agents/skills/tilelang-perf-optimization of tile-ai/tilelang-ascend.
Open the folder on GitHubat commit 83b0ece
Tilelang Perf Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Tilelang Perf Optimization this skilltile-ai/tilelang-ascend | 402 | — | ~1.2k | Automated safety check: Pass | MIT | |
| Liger Kernel Perflinkedin/Liger-Kernel | 6.7k | — | ~1.5k | Automated safety check: Pass | BSD-2-Clause | |
| Tilegym Improve Cutile Kernel PerfNVIDIA/skills | 3.5k | — | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Kernel Organizationsgl-project/sglang | 37k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Metal Kernelpytorch/pytorch | 104k | — | ~4.9k | Automated safety check: Pass | Custom licence | |
| Perf ComparisonClickHouse/ClickHouse | 50k | — | ~3.9k | Automated safety check: Notes | Apache-2.0 |
linkedin/Liger-Kernel
Optimizes the performance of existing Liger Kernel Triton kernels.
NVIDIA/skills
Iteratively optimize cuTile kernel performance through systematic profiling, bottleneck analysis, IR comparison, and targeted tuning.
sgl-project/sglang
Apply the SGLang kernels RFC when adding, moving, splitting, or reviewing kernel APIs, registry metadata, kernel tests, benchmarks, and model-specific implementations.
pytorch/pytorch
Write Metal/MPS kernels for PyTorch operators. An agent skill from pytorch/pytorch.
ClickHouse/ClickHouse
Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.
github/awesome-copilot
Create, update, refactor, explain, or review Semantic Kernel solutions using shared guidance plus language-specific references for .NET and Python.
tile-ai/tilelang-ascend
Automatically pull tilelang repository and its third-party code.
tile-ai/tilelang-ascend
How to add debugging capabilities to TileLang Ascend example operators.
tile-ai/tilelang-ascend
将 tilelang example 脚本转换为可在 A5 camodel 仿真器上直接运行的版本。输入脚本路径,输出一个新的 sim.py 文件,不覆盖原始文件。触发:仿真运行、camodel、A5 仿真、sim 模式、转换脚本为仿真、不需要 NPU 跑 kernel、simulate A5。
tile-ai/tilelang-ascend
TileLang-Ascend 环境检查与配置验证技能。检查代码仓库完整性、编译安装状态、环境变量配置,并运行简单测试验证环境。发现问题会自动调用相关 skill 进行修复,并按依赖顺序重新执行后续步骤。触发关键词:"环境检查"、"检查环境"、"验证环境"、"环境配置"、"环境搭建"、"env check"、"check environment"、"verify…
tile-ai/tilelang-ascend
TileLang-Ascend 算子测试设计技能。支持多种场景:(1) 从 design.md 设计测试配置 (2) 从 examples/{op}/.py 补充测试 (3) 手动提供算子信息生成测试 (4) 测试覆盖率分析。理解算子实现逻辑后智能判断测试策略。触发:设计算子测试、生成测试用例、补充测试、测试覆盖率不足。
tile-ai/tilelang-ascend
检查代码格式是否符合 CI 规则。自动检测并安装缺失工具(ruff、clang-format),先运行检查生成报告,使用醒目方式询问用户后,仅在用户同意时执行修复。工作流程:检测环境→自动安装缺失工具→运行检查→生成报告→醒目询问→用户确认→执行修复。使用此技能当:用户要求"格式检查"、"格式化代码"、"代码格式化"、"检查代码格式"、"代码…
TileLang 算子性能调优与潜在性能劣化模式检查。提供性能数据采集、瓶颈诊断、优化实施、效果验证能力;也用于生成或评审算子时对照常见性能劣化模式示例检查当前 kernel 代码。触发:算子精度通过后需要优化性能、性能不及预期时。. Tilelang Perf Optimization is an agent skill from tile-ai/tilelang-ascend.
Run `npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a claude-code`. Or copy the skill folder (.agents/skills/tilelang-perf-optimization in tile-ai/tilelang-ascend) into .claude/skills/tilelang-perf-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a codex`. Or copy the skill folder (.agents/skills/tilelang-perf-optimization in tile-ai/tilelang-ascend) into .agents/skills/tilelang-perf-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tile-ai/tilelang-ascend --skill tilelang-perf-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tilelang-perf-optimization, .gemini/skills/tilelang-perf-optimization, .github/skills/tilelang-perf-optimization and .opencode/skills/tilelang-perf-optimization in your project.
SKILL.md names no scripts, command-line tools or credentials: Tilelang Perf Optimization is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Tilelang Perf Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 44k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Tilelang Perf Optimization: Liger Kernel Perf (linkedin/Liger-Kernel, 6.7k stars), Tilegym Improve Cutile Kernel Perf (NVIDIA/skills, 3.5k stars), Kernel Organization (sgl-project/sglang, 37k stars) and Metal Kernel (pytorch/pytorch, 104k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
tile-ai (a GitHub organization) maintains it in tile-ai/tilelang-ascend, which has 402 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 9, 2026.
Source: tile-ai/tilelang-ascend on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.