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-elemwise-concatgit 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-elemwise-concat)<a href="https://agentmods.dev/skills/mindspore-ai/akg/triton-ascend-case-elemwise-concat"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-case-elemwise-concat/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-elemwise-concat"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-case-elemwise-concat.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.00073 | $0.00880 |
| Opus 5.5 | $0.00029 | $0.00352 |
| Sonnet 5.5 | $0.00015 | $0.00176 |
| Haiku 4.5 | $0.00007 | $0.00088 |
Grade A, and why
triton-ascend-case-elemwise-concat 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
Slice + Concat 融合算子优化案例
任务特征
- 操作类型:融合算子,6个slice + 1个concat融合在一个kernel中
- 数据尺寸:7个大小为(128, 50, 128)的输入,切片[128, 32, 48, 48, 48, 48, 48]后在W维度拼接,输出(128, 50, 400)
- 任务特点:算子融合,避免中间结果的存储和多次内存访问
优化 1:精确切片加载
# 只load需要的切片部分,而不是整个输入
# Input 1: 只load前128个元素
w_offs_1 = tl.arange(0, SLICE_1) # SLICE_1=128
input_offs = base_in_offs + w_offs_1[None, None, :] * stride_in_w
data = tl.load(x1_ptr + input_offs, mask=mask_1, other=0.0)
# Input 2: 只load前32个元素
w_offs_2 = tl.arange(0, SLICE_2) # SLICE_2=32
input_offs = base_in_offs + w_offs_2[None, None, :] * stride_in_w
data = tl.load(x2_ptr + input_offs, mask=mask_2, other=0.0)
优化内容
- 在kernel内部只load每个输入需要的切片部分(如128、32、48)
- 通过
w_offs = tl.arange(0, SLICE_SIZE)精确控制load的元素数量 - 减少不必要的内存访问,提高内存带宽利用率
优化 2:索引计算实现拼接
# 通过调整输出索引实现拼接,而非使用triton的cat指令
w_out_offset = 0
# Input 1写入位置: output[0:128]
output_offs = base_out_offs + (w_out_offset + w_offs_1)[None, None, :] * stride_out_w
tl.store(output_ptr + output_offs, data, mask=mask_1)
w_out_offset += SLICE_1 # 更新为128
# Input 2写入位置: output[128:160]
output_offs = base_out_offs + (w_out_offset + w_offs_2)[None, None, :] * stride_out_w
tl.store(output_ptr + output_offs, data, mask=mask_2)
w_out_offset += SLICE_2 # 更新为160
优化内容
- 通过维护输出偏移量(w_out_offset)并动态调整输出地址索引,将不同输入的数据写入到输出的不同位置
- 避免使用triton的cat指令,直接通过地址计算完成拼接
- 减少中间步骤和额外的数据搬运开销
总结
- 对于concat操作,应在kernel内精确load需要的切片部分,避免load完整数据后再切片
- 可通过索引计算直接将数据store到目标位置实现拼接,无需使用额外的cat指令
- 算子融合可以避免中间结果的存储和多次内存访问,提升整体性能
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 · 65 lines · 73 tokens per session scan A 763157736a1c
triton-ascend-case-elemwise-concat is a skill published in the GitHub repository mindspore-ai/akg (269 stars, last pushed today), licensed Apache-2.0. It adds 73 tokens to every session and 880 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-elemwise-concat compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| triton-ascend-case-elemwise-concatmindspore-ai/akg | Skill | 269 | today | Apache-2.0 | A | 73 | 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 |