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 | $0.00036 | $0.00440 |
| Sonnet 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 11d 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.
- 11d 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 (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 880 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
triton-ascend-case-reduction-prod-small
A guide to optimizing small product reductions, which multiply a group of tensor values into one result.
pypto-case-matvec
A matrix–vector multiplication workaround for cases where K is greater than 65,535. It replaces matrix multiplication with element-by-element multiplication followed by summing.
triton-ascend-case-reduction-mean-medium
A guide to optimizing medium-sized mean operations that reduce values along the first axis of a tensor.
triton-ascend-case-reduction-sum-large
A guide to optimizing large two-dimensional sum reductions when the non-reduced axis is very large and the reduced axis is medium-sized.
instrument-data-to-allotrope
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…
exploratory-data-analysis
Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…