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-case-reduction-amax-largegit 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-case-reduction-amax-large)<a href="https://agentmods.dev/skills/mindspore-ai/akg/triton-ascend-case-reduction-amax-large"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-case-reduction-amax-large/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-case-reduction-amax-large"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-case-reduction-amax-large.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.00081 | $0.00647 |
| Opus 5.5 | $0.00032 | $0.00259 |
| Sonnet 5.5 | $0.00016 | $0.00129 |
| Haiku 4.5 | $0.00008 | $0.00065 |
Grade A, and why
triton-ascend-case-reduction-amax-large 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.
What it actually says
大规模 Amax 归约优化(reduce轴映射多核)
任务特征
- 数据尺寸:(16, 262144),非reduce轴很小,reduce轴很大
- 策略:将reduce轴映射到多核,使用原子操作
优化 1:切分策略调整
# 错误:简单方式:非reduce轴映射多核
grid = lambda meta: (triton.cdiv(M, meta['BLOCK_SIZE_M']),)
# 正确:优化方式:reduce轴映射多核
grid = lambda meta: (triton.cdiv(N, meta['BLOCK_SIZE_N']),)
# Kernel内对列进行二次切分
for n_start in range(0, BLOCK_SIZE_N, SUB_BLOCK_SIZE_N):
n_offsets = pid * BLOCK_SIZE_N + n_start + tl.arange(0, SUB_BLOCK_SIZE_N)
优化 2:原子操作
方案一:循环内原子操作
for m_start in range(0, M, BLOCK_SIZE_M):
row_min = tl.min(curr_min, 1)
tl.atomic_min(output_ptrs, row_min, mask=mmask)
方案二:循环外原子操作
all_row_min = tl.full((M,), float('inf'), dtype=tl.float32)
for m_start in range(0, M, BLOCK_SIZE_M):
row_min = tl.min(curr_min, 1)
all_row_min = tl.insert_slice(all_row_min, row_min, ...)
tl.atomic_min(output_ptrs, all_row_min)
优化 3:配置
@triton.autotune(
configs=[
# grid=32<40, UB用满
triton.Config({'BLOCK_SIZE_M': 8, 'BLOCK_SIZE_N': 8192, 'SUB_BLOCK_SIZE_N': 1024}),
triton.Config({'BLOCK_SIZE_M': 16, 'BLOCK_SIZE_N': 8192, 'SUB_BLOCK_SIZE_N': 512}),
],
key=[...],
restore_value=['out_ptr0'], # autotune 必须加 restore_value
)
总结
非reduce轴很小、reduce轴很大时,将reduce轴映射到多核并结合原子操作,通过二次切分避免超出UB。
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 · 66 lines · 81 tokens per session scan A 139ee9621f06
triton-ascend-case-reduction-amax-large is a skill published in the GitHub repository mindspore-ai/akg (269 stars, last pushed today), licensed Apache-2.0. It adds 81 tokens to every session and 647 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.
triton-ascend-case-reduction-amax-large compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| triton-ascend-case-reduction-amax-largemindspore-ai/akg | Skill | 269 | today | Apache-2.0 | A | 81 | Claude Code, Codex |
| triton-ascend-case-reduction-prod-smallwenyi-li/awesome-agent-kernel-skills | Skill | 11 | 6mo ago | none | A | 95 | Claude Code, Codex |
| pypto-case-matvecwenyi-li/awesome-agent-kernel-skills | Skill | 11 | 6mo ago | none | A | 32 | Claude Code, Codex |
| triton-ascend-case-reduction-mean-mediumwenyi-li/awesome-agent-kernel-skills | Skill | 11 | 6mo ago | none | A | 82 | Claude Code, Codex |
| triton-ascend-case-reduction-sum-largewenyi-li/awesome-agent-kernel-skills | Skill | 11 | 6mo ago | none | A | 92 | Claude Code, Codex |
| instrument-data-to-allotropeanthropics/knowledge-work-plugins | Skill | 38k | today | Apache-2.0 | A | 123 | Claude Code |
| exploratory-data-analysisK-Dense-AI/scientific-agent-skills | Skill | 59k | 3d ago | MIT | A | 83 | Claude Code |