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-example-matmulgit 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-example-matmul)<a href="https://agentmods.dev/skills/mindspore-ai/akg/triton-ascend-example-matmul"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-example-matmul/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-example-matmul"><img src="https://agentmods.dev/badge/skills/mindspore-ai/akg/triton-ascend-example-matmul.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.00935 |
| Opus 5.5 | $0.00029 | $0.00374 |
| Sonnet 5.5 | $0.00015 | $0.00187 |
| Haiku 4.5 | $0.00007 | $0.00093 |
Grade A, and why
triton-ascend-example-matmul 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 2mo 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
矩阵乘法 — Triton Ascend 实现示例
import torch
import triton
import triton.language as tl
@triton.jit
def matmul_kernel(
a_ptr, b_ptr, c_ptr,
M, N, K,
stride_am, stride_ak,
stride_bk, stride_bn,
stride_cm, stride_cn,
CORE_NUM: tl.constexpr,
BLOCK_M: tl.constexpr, BLOCK_K: tl.constexpr, BLOCK_N: tl.constexpr,
):
NUM_BLOCKS_M = tl.cdiv(M, BLOCK_M)
NUM_BLOCKS_N = tl.cdiv(N, BLOCK_N)
NUM_BLOCKS = NUM_BLOCKS_M * NUM_BLOCKS_N
pid = tl.program_id(0)
for block_idx in range(pid, NUM_BLOCKS, CORE_NUM):
bm = block_idx // NUM_BLOCKS_N
bn = block_idx % NUM_BLOCKS_N
acc = tl.zeros((BLOCK_M, BLOCK_N), dtype=tl.float32)
for k in range(0, K, BLOCK_K):
a_off_m = bm * BLOCK_M + tl.arange(0, BLOCK_M)
a_off_k = k + tl.arange(0, BLOCK_K)
a_mask = (a_off_m < M)[:, None] & (a_off_k < K)[None, :]
a = tl.load(a_ptr + a_off_m[:, None] * stride_am
+ a_off_k[None, :] * stride_ak,
mask=a_mask, other=0.0)
b_off_k = k + tl.arange(0, BLOCK_K)
b_off_n = bn * BLOCK_N + tl.arange(0, BLOCK_N)
b_mask = (b_off_k < K)[:, None] & (b_off_n < N)[None, :]
b = tl.load(b_ptr + b_off_k[:, None] * stride_bk
+ b_off_n[None, :] * stride_bn,
mask=b_mask, other=0.0)
acc += tl.dot(a, b)
c_off_m = bm * BLOCK_M + tl.arange(0, BLOCK_M)
c_off_n = bn * BLOCK_N + tl.arange(0, BLOCK_N)
c_mask = (c_off_m < M)[:, None] & (c_off_n < N)[None, :]
tl.store(c_ptr + c_off_m[:, None] * stride_cm
+ c_off_n[None, :] * stride_cn,
acc, mask=c_mask)
class ModelNew(torch.nn.Module):
def __init__(self):
super().__init__()
try:
self.CUBE_CORE_NUM = torch_npu.npu.npu_config.get_device_limit(0).get("cube_core_num", 20)
except:
self.CUBE_CORE_NUM = 20
def forward(self, A, B):
if not A.is_contiguous():
A = A.contiguous()
if not B.is_contiguous():
B = B.contiguous()
M, K = A.shape
_, N = B.shape
C = torch.empty((M, N), dtype=torch.float32, device=A.device)
BLOCK_M, BLOCK_K, BLOCK_N = 128, 256, 128
grid = (self.CUBE_CORE_NUM,)
matmul_kernel[grid](
A, B, C, M, N, K,
A.stride(0), A.stride(1), B.stride(0), B.stride(1),
C.stride(0), C.stride(1),
CORE_NUM=self.CUBE_CORE_NUM,
BLOCK_M=BLOCK_M, BLOCK_K=BLOCK_K, BLOCK_N=BLOCK_N)
return C
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.
- 2mo ago First seen · 91 lines · 73 tokens per session scan A 55ad24f54eaa
triton-ascend-example-matmul is a skill published in the GitHub repository mindspore-ai/akg (266 stars, last pushed 2d ago), licensed Apache-2.0. It adds 73 tokens to every session and 935 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-09-03.
triton-ascend-example-matmul compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| triton-ascend-example-matmulmindspore-ai/akg | Skill | 266 | 2d ago | Apache-2.0 | A | 73 | Claude Code, Codex |
| triton-ascend-examples-mindsporewenyi-li/awesome-agent-kernel-skills | Skill | 10 | 5mo ago | none | A | 75 | Claude Code, Codex |
| spark-environment-setupwshobson/agents | Skill | 43k | 6d ago | MIT | A | 76 | Claude Code |
| spark-memory-thermal-opswshobson/agents | Skill | 43k | 6d ago | MIT | A | 59 | Claude Code |
| spark-training-gotchaswshobson/agents | Skill | 43k | 6d ago | MIT | A | 63 | Claude Code |
| inference-serving-llama-cppdavila7/claude-code-templates | Skill | 34k | today | MIT | A | 80 | Claude Code, Codex |
| supercomputertrycua/cua | Skill | 32k | today | MIT | A | 0 | Claude Code, Codex |