tilelang-ascend: Skill for Claude Code

.agents/skills/tilelang-custom-skill/tilelang-error-fixer/SKILL.md

tilelang-error-fixer is a skill for Claude Code, Codex from tile-ai/tilelang-ascend. It costs 74 tokens per session (1,770 once invoked), scanned A, original, MIT.

A diagnostic and repair workflow for TileLang-Ascend compiler passes and generated Ascend code. A compiler pass is a stage that transforms a program before it runs.

In plain words
What is it for?
It is for investigating core dumps, segmentation faults, compilation failures, incorrect generated code, IR transformations, and pass changes using tools such as GDB and AOT compilation.
Why use it?
It helps trace crashes, build errors, incorrect results, and precision or performance problems from the visible error back to the relevant compiler stage or C++ code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is tile-ai/tilelang-ascend's own configuration. It tells Claude Code and Codex how to work on tilelang-ascend itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tilelang-ascend configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/tile-ai/tilelang-ascend/ascendc_pto/.agents/skills/tilelang-custom-skill/tilelang-error-fixer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tile-ai/tilelang-ascend

Made for: Claude Code, Codex.

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

agentmods badge for tilelang-error-fixer

README.md
[![agentmods](https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-error-fixer/github.svg)](https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-error-fixer)
Your own site
<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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tilelang-error-fixer

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,770 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.01770
Opus 5.5 $0.00030 $0.00708
Sonnet 5.5 $0.00015 $0.00354
Haiku 4.5 $0.00007 $0.00177

Measured 1mo ago against content hash c75d4015e4b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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

.agents/skills/tilelang-custom-skill/tilelang-error-fixer/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 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 调试前,必须确保底层环境正常。

  1. 执行环境检查脚本验证 TL_ROOT, PYTHONPATH, ASCEND_HOME_PATH, LD_LIBRARY_PATH 等变量。
  2. 确认 C++ 工程是否处于最新编译状态。

步骤 2:多维度错误信息获取 (Dump & Catch)

根据报错类型,采取不同的信息获取策略:

  1. 严重崩溃 (Core Dump / Segment Fault):

    • 现象:脚本运行直接崩溃,没有任何 Python 异常堆栈。
    • 动作:使用 GDB 挂载 Python 进程进行排查。
      gdb --args python xxx.py
      # 在 GDB 命令行输入:
      (gdb) run
      # 崩溃后输入 bt 查看堆栈,精确定位是 C++ 源码中哪个函数/Pass 引发了内存违规
      
  2. C++ 编译报错 (Build Error):

    • 读取 /tmp/tmp*.cpp (获取最新的生成的失败代码) 定位语法或底层 API 错误。
  3. 逻辑/精度异常 (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)
      
  4. 目标代码分析 (Target Dump):

    • 通过 @tilelang.jit(debug_root_path=...) 或 .get_kernel_source() 抓取最终生成的 C++ 核函数。

步骤 3:核心错误原因分析 (TileLang 专属模式)

分析获取的 IR、目标代码或 GDB 堆栈,重点排查 TileLang-Ascend 特有的雷区:

  1. 循环嵌套与次数匹配:对比 Cube 和 Vec 部分的循环 extent,诊断类似 "Vec loop times is not enough" 的报错。
  2. 跨核同步点 (Sync Points):追踪 ascend_auto_set_cross_flag / wait_flag,排查死锁或数据竞争。
  3. 工作空间 (Workspace) 访问:检查张量切片范围,确认访问是否越界。
  4. 数据依赖与流水线 (Pipeline):分析 T.Pipelined 的 num_stages,检查读写重叠冲突。

步骤 4:修复方案制定(必要时使用 AOT 隔离)

根据步骤 3 的证据提出最小修复。需要区分 TileLang lowering 与目标代码行为时,可用 AOT 构造隔离实验:

方案 A:直接修复 C++ Pass(适用于 GDB 已明确指出问题代码行的情况)

  • 直接定位 src/transform/ 或 src/target/ 下的 .cc 文件,提供代码修改建议。

Read the full file on GitHub · 133 lines

Changes

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.

  1. 1mo ago Changed · +2 lines c75d4015e4b0
  2. 2mo ago First seen · 131 lines · 74 tokens per session scan A 85b3128e2752

Subscribe to this mod's changes

tilelang-error-fixer is a skill published in the GitHub repository tile-ai/tilelang-ascend (427 stars, last pushed yesterday), licensed MIT. It adds 74 tokens to every session and 1,770 once invoked, about $0.0003 per session on Opus 5.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.

Related

tilelang-error-fixer compared with skills from other repositories

tilelang-error-fixer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tilelang-error-fixertile-ai/tilelang-ascendSkill427yesterdayMITA74Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16kyesterdayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7k3d agoMITA71Claude Code, Codex
cwv-optimizeradobe/skillsSkill319yesterdayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex
incident-response-incident-responsermyndharis/antigravity-skillsSkill1.9k23d agoMITA36Claude Code
triaging-web-analytics-supportPostHog/posthogSkill41kyesterdaynoneA151Claude Code, Codex