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-api-best-practices/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-api-best-practices)<a href="https://agentmods.dev/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices/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-api-best-practices"><img src="https://agentmods.dev/badge/skills/tile-ai/tilelang-ascend/tilelang-api-best-practices.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.00079 | $0.01053 |
| Opus 5.5 | $0.00032 | $0.00421 |
| Sonnet 5.5 | $0.00016 | $0.00211 |
| Haiku 4.5 | $0.00008 | $0.00105 |
Grade A, and why
tilelang-api-best-practices 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.
How it starts
The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TileLang Ascend API 最佳实践
API 文档索引
| 文档 | 涵盖内容 | 典型场景 |
|---|---|---|
| api-kernel-memory.md | Kernel 定义、JIT/compile_flags、内存分配、数据搬运 |
Kernel 编写、编译配置、片上存储管理 |
| api-compute.md | GEMM、归约、tmp arena、Element-wise、Tile 扩展原语 |
GEMM、Softmax、逐元素计算、排序、显式 UB 规划 |
| api-schedule-sync.md | 循环(T.serial, T.unroll)、流水线(T.Pipelined)、持久化调度(T.Persistent)、同步(T.set_flag/wait_flag, T.barrier_all, T.set_cross_flag)、调试(T.printf, T.dump_tensor) | 流水线优化、多核均衡、同步、调试 |
场景索引
| 使用场景 | 相关文档 | 关键技巧 |
|---|---|---|
| GEMM 矩阵乘 | api-compute, api-kernel-memory | 内存层级、layout、init 与模式对应的同步 |
| Softmax/LayerNorm | api-compute | T.reduce_max/sum、T.tile.exp/sub/div |
| 逐元素计算 | api-compute | T.Parallel + 符号 API 或 T.tile.xxx 两种范式 |
| 多 block/core 累加到 GM | api-compute | T.tile.atomic_add(dst_gm, src_local),调用前显式清零 GM |
| CV 融合算子 | api-kernel-memory, api-schedule-sync | Developer/Hybrid 用 threads + passes;Expert 用显式 scope/sync |
| 流水线优化 | api-schedule-sync | T.Pipelined num_stages、核间/核内流水线 |
| 多核负载均衡 | api-schedule-sync | T.Persistent 缓存友好调度 |
| 排序 | api-compute | T.tile.sort → T.tile.merge_sort → T.tile.topk |
| 显式 UB scratch / row-expand | api-compute | 区分通用 tmp arena 与 row-expand 专用布局 |
| JIT 编译选项 | api-kernel-memory | 使用 kernel-scoped compile_flags,不修改进程环境 |
| 手动缓冲复用 | api-schedule-sync | 同时审计 ready 与 free 两个 ownership 方向 |
| Kernel 调试 | api-schedule-sync | T.printf、T.dump_tensor、get_kernel_source() |
| dtype 标量回退适配 | api-compute | 先确认硬件支持;同宽 reinterpret / kernel 内 cast / record-aware DMA / 块 DMA + UB-local fallback;宽 dtype lane 拆分仅作已验证实验 |
What ships with it
3 files 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 · -47 lines 490471d5e945
- 1mo ago Changed bf35f90733fc
- 2mo ago First seen · 96 lines · 79 tokens per session scan A d5f89f94ae0f
tilelang-api-best-practices is a skill published in the GitHub repository tile-ai/tilelang-ascend (427 stars, last pushed yesterday), licensed MIT. It adds 79 tokens to every session and 1,053 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.
tilelang-api-best-practices compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tilelang-api-best-practicestile-ai/tilelang-ascend | Skill | 427 | yesterday | MIT | A | 79 | Claude Code, Codex |
| jupyter-notebookNousResearch/hermes-agent | Skill | 261k | yesterday | MIT | A | 18 | Claude Code, Codex |
| matlabK-Dense-AI/scientific-agent-skills | Skill | 56k | 4d ago | MIT | A | 44 | Claude Code |
| pennylaneK-Dense-AI/scientific-agent-skills | Skill | 56k | 4d ago | MIT | A | 74 | Claude Code |
| cuequivariance-jaxNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 38 | Claude Code, Codex |
| cuequivariance-torchNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 37 | Claude Code, Codex |
| cuopt-numerical-optimization-apiNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 51 | Claude Code, Codex |