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.01573 |
| Opus 5 | $0.00039 | $0.00787 |
| Sonnet 5 | $0.00016 | $0.00315 |
| Haiku 4.5 | $0.00008 | $0.00157 |
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 9d 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 — 96 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 定义(T.prim_func, T.Kernel, @jit)、内存分配(Developer: T.alloc_shared/fragment/var, Expert: T.alloc_ub/L1/L0x)、数据搬运(T.copy) | Kernel 编写、片上存储管理、数据搬运 |
| api-compute.md | 矩阵计算(T.gemm_v0, T.mma)、归约(T.reduce_sum/max/min)、Element-wise(T.Parallel + 符号 API)、Tile 扩展原语(T.tile.xxx,含 T.tile.atomic_add) | GEMM、Softmax、逐元素计算、排序、原子累加 |
| 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 | shared→fragment 层级搬运、init 参数、T.barrier_all |
| 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 | workspace 索引一致性、AUTO_CV_COMBINE、vid 并行化 |
| 流水线优化 | api-schedule-sync | T.Pipelined num_stages、核间/核内流水线 |
| 多核负载均衡 | api-schedule-sync | T.Persistent 缓存友好调度 |
| 排序 | api-compute | T.tile.sort → T.tile.merge_sort → T.tile.topk |
| 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.
- 9d 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 (363 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,573 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.
Other skills, from other repositories
jupyter-notebook
Iterative Python via live Jupyter kernel (hamelnb).
matlab
Build, review, migrate, and safely plan MATLAB or GNU Octave numerical workflows, including arrays, tabular/time data, tests, projects, graphics, MAT files, and explicit Python interoperability.
pennylane
Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with…
cuopt-numerical-optimization-api
LP, MILP, and QP (beta) with cuOpt — Python, C, and CLI. Use when the user is solving LP, MILP, or QP with any cuOpt interface.
rocm-kernels
Provides guidance for writing and benchmarking optimized Triton kernels for AMD GPUs (MI355X, R9700) on ROCm, targeting HuggingFace diffusers (LTX-Video, SD3, FLUX) and transformers. Core kernels: RMSNorm, RoPE 3D, GEGLU, AdaLN. Includes XCD swizzle, autotune, diffusers integration patterns, and LTX-Video pipeline…
gh-address-comments
Help address review/issue comments on the open GitHub PR for the current branch using gh CLI; verify gh auth first and prompt the user to authenticate if not logged in.