Borrowing it
Nothing to install: this file belongs to tile-ai/tilelang-ascend. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/tile-ai/tilelang-ascend/ascendc_pto/.agents/skills/tilelang-custom-skill/tilelang-error-fixer/SKILL.mdgit clone --depth 1 https://github.com/tile-ai/tilelang-ascendWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-error-fixer)<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-error-fixer"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-error-fixer.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00074 | $0.01868 |
| Opus 5 | $0.00037 | $0.00934 |
| Sonnet 5 | $0.00015 | $0.00374 |
| Haiku 4.5 | $0.00007 | $0.00187 |
Grade A, and why
tilelang-error-fixer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TileLang-Ascend Pass 错误诊断与修复技能
本技能提供 TileLang-Ascend 框架中 Pass 层面错误的完整诊断和修复能力,支持从前端报错、Core Dump 崩溃追溯到后端 C++ Pass 的修复,并集成 AOT 目标代码验证机制。
使用场景
- 遇到 Core Dump 或 Segmentation Fault 等严重崩溃,且无其他明确错误信息
- TileLang 编译报错或生成的 Ascend 目标代码结果不符合预期(精度/性能问题)
- 编写或修改
src/transform/*.cc下的新 Pass 时出现逻辑异常 - 需要使用 AOT 提前编译模式进行算子调试与倒推
触发机制
当用户输入包含以下关键字时自动触发:
- "Core Dump"、"Segment Fault"、"段错误"
- "TileLang 编译报错"、"Pass 生成代码错误"
- "排查精度问题,分析 IR"、"使用 AOT 调试这个算子"
- "修复 TileLang Pass"
工作流程
步骤 1:环境与状态检查
在进行任何 Pass 调试前,必须确保底层环境正常。
- 执行环境检查脚本验证
TL_ROOT,PYTHONPATH,ASCEND_HOME_PATH,LD_LIBRARY_PATH等变量。 - 确认 C++ 工程是否处于最新编译状态。
步骤 2:多维度错误信息获取 (Dump & Catch)
根据报错类型,采取不同的信息获取策略:
-
严重崩溃 (Core Dump / Segment Fault):
- 现象:脚本运行直接崩溃,没有任何 Python 异常堆栈。
- 动作:使用 GDB 挂载 Python 进程进行排查。
gdb --args python xxx.py # 在 GDB 命令行输入: (gdb) run # 崩溃后输入 bt 查看堆栈,精确定位是 C++ 源码中哪个函数/Pass 引发了内存违规
-
C++ 编译报错 (Build Error):
- 读取
/tmp/tmp*.cpp(获取最新的生成的失败代码) 定位语法或底层 API 错误。
- 读取
-
逻辑/精度异常 (IR Dump):
- 追踪 Pass 阶段性变换。在
tilelang/engine/lower.py中的lower()函数内,添加print(mod)以查看最终 IR 图:def lower(...): ... mod = OptimizeForTarget(mod, target) print(mod) # <--- 在此处打印 IR,排查 Pass 优化后的结果 codegen_mod = device_codegen(mod, target)
- 追踪 Pass 阶段性变换。在
-
目标代码分析 (Target Dump):
- 通过
@tilelang.jit(debug_root_path=...)或.get_kernel_source()抓取最终生成的 C++ 核函数。
- 通过
步骤 3:核心错误原因分析 (TileLang 专属模式)
分析获取的 IR、目标代码或 GDB 堆栈,重点排查 TileLang-Ascend 特有的雷区:
- 循环嵌套与次数匹配:对比 Cube 和 Vec 部分的循环
extent,诊断类似 "Vec loop times is not enough" 的报错。 - 跨核同步点 (Sync Points):追踪
ascend_auto_set_cross_flag/wait_flag,排查死锁或数据竞争。 - 工作空间 (Workspace) 访问:检查张量切片范围,确认访问是否越界。
- 数据依赖与流水线 (Pipeline):分析
T.Pipelined的num_stages,检查读写重叠冲突。
步骤 4:修复方案制定 (支持 AOT 倒推)
LLM 根据步骤 3 提出修复方案。对于代码生成或精度相关的复杂问题,强烈建议采用 AOT (Ahead-Of-Time) 模式进行验证:
方案 A:直接修复 C++ Pass(适用于 GDB 已明确指出问题代码行的情况)
- 直接定位
src/transform/或src/target/下的.cc文件,提供代码修改建议。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 131 lines · 74 tokens per session scan A 85b3128e2752
tilelang-error-fixer is a skill published in the GitHub repository tile-ai/tilelang-ascend (363 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 1,868 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
debug-optimize-lcp
Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…
systematic-debugging
Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.
diagnose
Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.
repro-admin
Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.
log-error-digest
Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…
byted-util-volcengine-detect-retry
An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.