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 | $0.00036 | $0.00467 |
| Sonnet 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 7d 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.
- 7d 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 (259 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 935 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-09-03.
Other skills, from other repositories
triton-ascend-examples-mindspore
Integration examples for using Triton Ascend kernels inside MindSpore, a machine-learning framework. They show how to register a custom operation and pass tensors in and out.
spark-environment-setup
Set up a working ML training/inference environment on NVIDIA DGX Spark (GB10, aarch64, CUDA 13). Use when installing PyTorch/Unsloth/TRL/vLLM on DGX Spark, hitting libcudart or wheel-ABI errors on aarch64, or choosing between NGC containers and bare pip installs.
spark-memory-thermal-ops
Manage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.
spark-training-gotchas
Preflight and diagnose the ten known failure modes for ML training on NVIDIA DGX Spark. Use when a training run on DGX Spark fails to start, OOMs below the 128GB limit, slows down mid-run, or before any multi-hour training job on GB10.
llama-cpp
Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware. Use for edge deployment, M1/M2/M3 Macs, AMD/Intel GPUs, or when CUDA is unavailable. Supports GGUF quantization (1.5-8 bit) for reduced memory and 4-10× speedup vs PyTorch on CPU.
minicpm5-deploy-vllm-ascend
Deploy MiniCPM5-2B with vLLM on Huawei Ascend NPU using vLLM-Ascend. Use when the user mentions vLLM-Ascend, Ascend NPU, Huawei Ascend, CANN, torchnpu, davinci devices, or wants an OpenAI-compatible MiniCPM5 server on Ascend hardware.