tilelang-ascend: Skill for Claude Code

.agents/skills/tilelang-custom-skill/tilelang-programming-model-guide/SKILL.md

tilelang-programming-model-guide is a skill for Claude Code, Codex from tile-ai/tilelang-ascend. It costs 59 tokens per session (2,837 once invoked), scanned A, original, MIT.

A guide to choosing between TileLang Ascend’s Developer and Expert programming modes and setting their pass configurations, which control compiler processing steps.

In plain words
What is it for?
Use it when starting or changing a TileLang Ascend operator, configuring pass settings, or deciding how memory, computation, synchronization, and Cube/Vector work should be handled.
Why use it?
It removes guesswork when deciding how much control to give the compiler, especially when switching modes or mixing them. It also points to the appropriate mode for portability versus low-level performance control.

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-programming-model-guide/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-programming-model-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide/github.svg)](https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide)
Your own site
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide/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-programming-model-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-programming-model-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,837 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.00059 $0.02837
Opus 5.5 $0.00024 $0.01135
Sonnet 5.5 $0.00012 $0.00567
Haiku 4.5 $0.00006 $0.00284

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

Security

Grade A, and why

tilelang-programming-model-guide 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 28d 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-programming-model-guide/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TileLang Ascend 编程模式与 pass_configs 指南

本 skill 帮助 agent 选择配置、保留已有控制方式并检查模式转换。默认值、API 语义和限制以 公共语言参考 为准;可运行写法从文末的仓库示例选取,不在 skill 中维护另一份 API 合同。


1. 模式对比

维度 Developer 模式 Expert 模式
内存分配 T.alloc_shared / T.alloc_fragment T.alloc_L1 / T.alloc_ub / T.alloc_L0A/L0B/L0C
计算表达 T.Parallel + 符号运算 T.tile.xxx 扩展原语
作用域 编译器自动分离 Cube/Vector 手动 with T.Scope("C"/"V")
同步 编译器自动插入 手写 LOCK DSL,由预处理器生成底层 flag
CV 交互 可将 workspace 与 vid 的处理交给编译器,见 §3.1.1 显式 GM workspace + 手动 vid 二分
pass_configs 按 §2.2 配置同步与内存规划,沿用默认 C/V 划分 手写 scope 可沿用默认 C/V 划分;全手动时显式关闭
适用场景 大多数算子,跨平台兼容 极致性能优化,需要底层控制
示例目录 examples/developer_mode/ examples/flash_attention/fa_opt/flash_attn_bhsd_expert_*.py

混合模式:Developer 主体 + 少量 Ascend 专属 T.tile.xxx。仍使用 Developer 的 pass_configs,由编译器生成 resource scope 和同步;不要因为用了 T.tile.* 就关闭 CombineCV。


2. pass_configs 详解(核心)

配置默认值与 scope 兼容规则以 公共语言参考 为准。

2.1 先判断执行侧,再检查依赖

  • 使用默认配置,不生成冗余的 TL_ASCEND_AUTO_CV_COMBINE: True。
  • 遇到已有显式 scope 时,检查其中的操作归属;不要仅因手写 scope 就关闭 CombineCV。
  • 只有设计要求关闭自动划分时才显式设置 False,并检查所有硬件操作都已放入正确 scope。
  • 自动划分执行侧不代表数据依赖已同步;分别检查核内依赖和跨 C/V 的 workspace 交互。

2.2 按场景选择 pass_configs

沿用用户已选模式;新算子尚未确定模式时先确认。不要仅因为 API 名称包含 T.tile.*、 kernel 含有 GEMM,或已经手写 scope,就替用户切换整套配置。

Developer/Hybrid 纯 Vector 或纯 Cube 算子:

pass_configs = {
    tilelang.PassConfigKey.TL_ASCEND_AUTO_SYNC: True,
    tilelang.PassConfigKey.TL_ASCEND_MEMORY_PLANNING: True,
}

存在需要自动同步的 C/V workspace 交互时,先对照同类示例确认该交互可被识别,再追加:

pass_configs[tilelang.PassConfigKey.TL_ASCEND_AUTO_CV_SYNC] = True

检查生成代码中的通知与等待是否覆盖实际读写和 buffer 复用;不能仅凭开关开启就删除 现有跨核同步。单纯含有 GEMM 不意味着存在跨核依赖。

已有手写 scope 或手动同步:保留其控制方式,逐项检查配置。仅当设计明确要求关闭 所有自动处理时使用下面的全手动配置,不把它当成手写 scope 的必需配置:

pass_configs = {
    tilelang.PassConfigKey.TL_ASCEND_AUTO_CV_COMBINE: False,
    tilelang.PassConfigKey.TL_ASCEND_AUTO_CV_SYNC: False,
    tilelang.PassConfigKey.TL_ASCEND_MEMORY_PLANNING: False,
    tilelang.PassConfigKey.TL_ASCEND_AUTO_SYNC: False,
}

Read the full file on GitHub · 166 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · -54 lines f3e965e1e081
  2. 1mo ago Changed · +34 lines 9f656b4c7bc5
  3. 2mo ago First seen · 186 lines · 59 tokens per session scan A c7ae1a730294

Subscribe to this mod's changes

tilelang-programming-model-guide is a skill published in the GitHub repository tile-ai/tilelang-ascend (427 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 2,837 once invoked, about $0.0002 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-programming-model-guide compared with skills from other repositories

tilelang-programming-model-guide next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tilelang-programming-model-guidetile-ai/tilelang-ascendSkill427yesterdayMITA59Claude Code, Codex
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143ktodayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143ktodayMITA103Claude Code