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,868 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.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.svg" alt="Measured on agentmods" 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,868 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.01868
Opus 5 $0.00037 $0.00934
Sonnet 5 $0.00015 $0.00374
Haiku 4.5 $0.00007 $0.00187

Measured 8d ago against content hash 85b3128e2752, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 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.

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

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 调试前,必须确保底层环境正常。

  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.Pipelinednum_stages,检查读写重叠冲突。

步骤 4:修复方案制定 (支持 AOT 倒推)

LLM 根据步骤 3 提出修复方案。对于代码生成或精度相关的复杂问题,强烈建议采用 AOT (Ahead-Of-Time) 模式进行验证:

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

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

Read the full file on GitHub · 131 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. 8d 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 (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.

Related

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…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

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.

open-metadata/OpenMetadata · 37 tokens

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.

emdash-cms/emdash · 43 tokens

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.

emdash-cms/emdash · 48 tokens

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…

zebbern/claude-code-guide · 71 tokens

byted-util-volcengine-detect-retry

An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.

bytedance/agentkit-samples · 101 tokens