Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mindspore-ai/akg --skill tilelang-cuda-apigit clone --depth 1 https://github.com/mindspore-ai/akgWrote 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/mindspore-ai/akg/tilelang-cuda-api)<a href="https://agentmods.dev/skills/mindspore-ai/akg/tilelang-cuda-api"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/tilelang-cuda-api/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/mindspore-ai/akg/tilelang-cuda-api"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/tilelang-cuda-api.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.00043 | $0.03002 |
| Opus 5.5 | $0.00017 | $0.01201 |
| Sonnet 5.5 | $0.00009 | $0.00600 |
| Haiku 4.5 | $0.00004 | $0.00300 |
Grade A, and why
tilelang-cuda-api 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 3mo 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 — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TileLang CUDA API 参考手册
本文档提供 TileLang 核心 API 的详细参考,包括函数签名、参数说明和使用示例。
1. 内核定义与编译
@tilelang.jit(out_idx)
@tilelang.jit(out_idx=[-1])
def my_kernel(M, N, K, block_M, block_N, block_K):
@T.prim_func
def main(
A: T.Tensor((M, K), "float16"),
B: T.Tensor((K, N), "float16"),
C: T.Tensor((M, N), "float16"),
):
# 内核实现
pass
return main
- 作用: 将 TileLang 函数编译为 GPU 内核
- 参数:
out_idx- 指定输出张量的索引列表(如[-1]表示最后一个参数为输出) - 调用: 设置
out_idx后,运行内核时只需传入输入张量,输出由 TileLang 自动创建
tilelang.compile
kernel = tilelang.compile(my_func, out_idx=[-1])
- 作用: 编译 TileLang 函数(等价于
@tilelang.jit)
2. 内核上下文
T.Kernel(grid_x, grid_y, threads)
with T.Kernel(T.ceildiv(N, block_N), T.ceildiv(M, block_M), threads=128) as (bx, by):
# bx, by 对应 blockIdx.x, blockIdx.y
pass
- 参数:
grid_x: 网格 X 维度大小grid_y: 网格 Y 维度大小(可选)threads: 每个线程块的线程数
- 返回: 线程块索引
(bx, by)
T.ceildiv(a, b)
grid_size = T.ceildiv(N, block_N)
- 参数:
a,b- 被除数和除数 - 返回: 向上取整的除法结果
- 用途: 计算网格大小
3. 内存分配 API
T.alloc_shared(shape, dtype)
A_shared = T.alloc_shared((block_M, block_K), "float16")
- 作用: 分配共享内存(对应 GPU 共享内存)
- 参数:
shape: 张量形状dtype: 数据类型
- 用途: 缓存频繁访问的数据
T.alloc_fragment(shape, dtype)
C_local = T.alloc_fragment((block_M, block_N), "float")
- 作用: 分配寄存器片段(对应 GPU 寄存器文件)
- 参数:
shape: 张量形状dtype: 数据类型
- 用途: 累加器和临时存储
T.alloc_local(shape, dtype)
temp = T.alloc_local((1,), "float32")
- 作用: 分配线程本地内存
- 参数:
shape: 张量形状dtype: 数据类型
- 用途: 线程私有的临时变量
4. 数据操作 API
T.copy(src, dst)
# 全局内存到共享内存
T.copy(A[by * block_M, ko * block_K], A_shared)
# 寄存器到全局内存
T.copy(C_local, C[by * block_M, bx * block_N])
- 作用: 高效内存复制,自动合并访问
- 参数:
src: 源数据(可以是全局内存切片或寄存器片段)dst: 目标数据
T.clear(tensor)
T.clear(C_local)
- 作用: 将张量清零
- 参数:
tensor- 要清零的张量
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.
- 3mo ago First seen · 348 lines · 43 tokens per session scan A c9d57bf0babe
tilelang-cuda-api is a skill published in the GitHub repository mindspore-ai/akg (269 stars, last pushed yesterday), licensed Apache-2.0. It adds 43 tokens to every session and 3,002 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-cuda-api compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| tilelang-cuda-apimindspore-ai/akg | Skill | 269 | yesterday | Apache-2.0 | A | 43 | Claude Code, Codex |
| agent-platform-model-registrygoogle/skills | Skill | 26k | yesterday | Apache-2.0 | A | 60 | Claude Code, Codex |
| llm-evaluationsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 25 | Claude Code |
| google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skills | Skill | 26k | yesterday | Apache-2.0 | A | 132 | Claude Code, Codex |
| training-checkwanshuiyin/Auto-claude-code-research-in-sleep | Skill | 20k | 4d ago | MIT | A | 35 | Claude Code |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.4k | yesterday | Apache-2.0 | A | 92 | Claude Code |
| nemo-automodel-launcher-configNVIDIA/skills | Skill | 4.4k | yesterday | Apache-2.0 | A | 30 | Claude Code |