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 triton-ascend-error-fixgit 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/triton-ascend-error-fix)<a href="https://agentmods.dev/skills/mindspore-ai/akg/triton-ascend-error-fix"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-error-fix/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/triton-ascend-error-fix"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-error-fix.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.00057 | $0.01955 |
| Opus 5 | $0.00028 | $0.00978 |
| Sonnet 5 | $0.00011 | $0.00391 |
| Haiku 4.5 | $0.00006 | $0.00196 |
Grade A, and why
triton-ascend-error-fix 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 — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.
1. UB / CBUF 溢出
- 报错特征:
cbuf overflow - 根因: 分块参数(BLOCK_M/N/K)过大,超出 Ascend UB 容量
- 修复: 减小分块参数,通常 BLOCK_M=64, BLOCK_N=128 是安全起点
# 错误:分块过大导致 UB overflow
BLOCK_M, BLOCK_N, BLOCK_K = 128, 256, 256
# 修复:安全起始点
# CUBE (matmul fp16): BLOCK_M=64, BLOCK_N=64, BLOCK_K=32
# CUBE (matmul fp32): BLOCK_M=32, BLOCK_N=32, BLOCK_K=32
# VEC (elementwise): BLOCK_SIZE=1024~2048
BLOCK_M, BLOCK_N, BLOCK_K = 64, 64, 32
4D tensor 矩阵乘法中 batch 维度额外占用 UB 空间,建议将 batch 展开到 grid 维度而非内层循环。
2. BiShengIR / HiVM 编译失败
- 报错特征:
hivm.hir.vsel: Unsupported op for finding the root alloc、Failed to run BiShengHIR pipeline - 根因: 编译器后端不支持复杂的 mask 组合或指针运算模式
2a. 内联地址计算过于复杂
# 错误
tl.store(c_ptr + off_m[:, None] * stride_cm + off_n[None, :] * stride_cn, acc, mask=mask)
# 修复:拆分为中间变量
c_ptrs = c_ptr + off_m[:, None] * stride_cm + off_n[None, :] * stride_cn
tl.store(c_ptrs, acc, mask=mask)
2b. tl.where + 复杂 mask 导致 vsel 错误
# 错误:嵌套 mask + tl.where 触发 hivm.hir.vsel 错误
a_tri_mask = a_offsets_k[None, :] >= a_offsets_m[:, None]
a_valid_mask = a_mask_m & a_mask_k
a = tl.where(a_tri_mask & a_valid_mask, a, 0.0)
# 修复:改用乘法替代 tl.where(将 bool mask 转为 float 后相乘)
a_tri_mask = (a_offsets_k[None, :] >= a_offsets_m[:, None]).to(tl.float16)
a_valid_mask = (a_mask_m).to(tl.float16) * (a_mask_k).to(tl.float16)
a = a * a_tri_mask * a_valid_mask
3. Triton 语法限制违反
3a. 禁止 continue / break / return
# 错误:unsupported AST node type: Continue
for i in range(N):
if condition:
continue
do_work()
# 修复:用 if-else 包裹
for i in range(N):
if not condition:
do_work()
3b. constexpr 索引错误
# 错误:ValueError('unsupported tensor index: constexpr[0]')
result = tl.sum(data, axis=0)
tl.atomic_add(out_ptr, result[0])
# 修复:tl.sum 已返回标量,直接使用
result = tl.sum(data, axis=0)
tl.atomic_add(out_ptr, result)
3c. tensor.cast 类型不兼容
# 错误:cast incompatible shapes
result = tl.dot(a_fp16, b_fp16)
# 修复:显式指定 fp32 累加器
result = tl.dot(a_fp16, b_fp16, acc=tl.zeros([M, N], dtype=tl.float32))
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 · 191 lines · 57 tokens per session scan A ff500f9a4e89
triton-ascend-error-fix is a skill published in the GitHub repository mindspore-ai/akg (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 57 tokens to every session and 1,955 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
GitHub CI Fix Debugging
Debug and fix failing GitHub PR checks by inspecting GitHub Actions logs, summarizing failure context, drafting fix plans, and implementing fixes after approval.
fixing
Diagnose why a PR's CI failed — compare the CI definition against the sandbox, classify the failure, and make the minimal repair. Use when a PR is red and you must work out why before changing anything.
systematic-debug
4-phase root cause analysis and debugging.
debugging-dating
A debugging-themed dating skill for AI agents on inbed.ai, a platform where agents meet and form connections. Debugging means finding and fixing what is not working.
fix
Use when the user provides a GitHub Issue URL and wants it fixed in the current repo. Do NOT use for feature requests without a clear bug or for PRs (use /code-review).
fix-bug
Investigates and fixes a reported bug. Reads relevant code, identifies the root cause, proposes a fix, and adds or updates tests to prevent regression. Invoked when the user describes unexpected behavior, an error, a crash, or a failing test.