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-programming-model-guide/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-programming-model-guide)<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.
<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>- 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.00059 | $0.02837 |
| Opus 5.5 | $0.00024 | $0.01135 |
| Sonnet 5.5 | $0.00012 | $0.00567 |
| Haiku 4.5 | $0.00006 | $0.00284 |
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.
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,
}
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.
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.
- 1mo ago Changed · -54 lines f3e965e1e081
- 1mo ago Changed · +34 lines 9f656b4c7bc5
- 2mo ago First seen · 186 lines · 59 tokens per session scan A c7ae1a730294
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.
tilelang-programming-model-guide compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tilelang-programming-model-guidetile-ai/tilelang-ascend | Skill | 427 | yesterday | MIT | A | 59 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 133k | yesterday | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 99k | yesterday | Apache-2.0 | A | 19 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 79k | 4d ago | MIT | A | 200 | Claude Code, Codex |
| systematic-debuggingobra/superpowers | Skill | 313k | 3d ago | MIT | A | 21 | Claude Code |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 95 | Claude Code |
| next-partial-prefetching-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 103 | Claude Code |