TR

triton-operator-design

Guides the design and documentation of custom Triton operators.

Install

mkdir -p .claude/skills/triton-operator-design && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17155" && unzip -o skill.zip -d .claude/skills/triton-operator-design && rm skill.zip

Installs to .claude/skills/triton-operator-design

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

生成适用于 Ascend NPU 的 Triton 算子需求文档。当用户需要设计新的 Triton 算子、编写算子需求文档、进行算子性能优化设计时使用。核心产出:功能定义、API 接口、Tiling 策略、Kernel 实现方案。
115 charsno explicit “when” trigger
Advanced

Key capabilities

  • Analyze requirements for Triton operators, including functional definitions and mathematical formulas
  • Design API interfaces for new Triton operators
  • Define input/output constraints and hardware limitations for operators
  • Develop Tiling strategies for optimal performance on Ascend NPU
  • Propose Kernel implementation schemes for Triton operators
  • Ensure adherence to specific memory alignment and precision requirements

How it works

The skill guides through a workflow from requirements analysis to feature implementation, loading specific reference resources at each stage to generate a Triton operator design document.

Inputs & outputs

You give it
A request to design a new Triton operator or optimize an existing one for Ascend NPU
You get back
A Triton operator requirement document covering function definition, API, Tiling strategy, and Kernel implementation

When to use triton-operator-design

  • Design custom NPU operator
  • Optimize kernel tiling
  • Document operator specs

About this skill

Triton 算子需求文档生成

工作流

  1. 需求分析 → 产出:功能定义、数学公式、竞品对比
  2. 原型设计 → 产出:API 接口定义
  3. 规格约束 → 产出:输入输出约束、硬件限制
  4. 特性实现 → 产出:Tiling 策略、Kernel 实现方案

参考资源加载

阶段必须加载不要加载
需求分析ascend-terminology.mdtemplate, tiling-strategies
原型设计triton-api-reference.mdtiling-strategies
特性实现tiling-strategies.md, triton-operator-template.mdascend-terminology

MANDATORY:阶段 4 前,完整阅读 tiling-strategies.mdtriton-operator-template.md,不设行数限制。按模板格式输出文档。

关键术语

  • GM:全局内存(DDR),UB:Vector Core 高速缓存(192KB),L1:Cube Core 缓存(~1MB)
  • AI Core:A2/A3 有 24 个,含 1 Cube + 2 Vector
  • 归约操作必须升精度到 FP32

绝对不要做的事

  • ❌ 使用模糊术语("适当切分"、"合理分配")— 必须给出具体计算方法
  • ❌ 忽略 UB 大小(192KB)和对齐要求(32B)
  • ❌ 不区分 Vector Core(向量计算)和 Cube Core(矩阵计算)
  • ❌ 不标注数据流图中的数据类型和 GM↔UB 传输
  • ❌ 归约操作不说明升精度策略

常见陷阱

陷阱症状解决
UB 超限方案不可实现计算缓冲区总大小 < 192KB
内存未对齐硬件报错UB 缓冲区 32B 对齐,单值缓冲区分配 32B
精度损失FP16 结果不准归约前升 FP32,完成后降精度
Tiling 不合理性能差/大 shape 不支持按维度切分,避免跨 Core 数据依赖

When not to use it

  • When designing operators for platforms other than Ascend NPU
  • When the task does not involve Triton operators
  • When the request is for general software design not specific to NPU operators

Limitations

  • Requires specific reference resources to be loaded at different stages
  • Strict adherence to template format for output document
  • Prohibits vague terminology, requiring concrete calculation methods

How it compares

This workflow provides a structured, NPU-specific approach to Triton operator design, ensuring consideration of hardware constraints and optimization strategies from the outset, unlike general software development processes.

Compared to similar skills

triton-operator-design side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
triton-operator-design (this skill)03moNo flagsAdvanced
langchain-architecture83moReviewIntermediate
ai-agents-architect56moNo flagsAdvanced
gguf-quantization67moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

langchain-architecture

wshobson

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

899

ai-agents-architect

davila7

Expert in designing and building autonomous AI agents. Masters tool use, memory systems, planning strategies, and multi-agent orchestration. Use when: build agent, AI agent, autonomous agent, tool use, function calling.

534

gguf-quantization

davila7

GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.

629

pytorch-fsdp2

Orchestra-Research

Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing. Use when models exceed single-GPU memory or when you need DTensor-based sharding with DeviceMesh.

627

huggingface-accelerate

davila7

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

328

llm-app-patterns

davila7

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

326

Search skills

Search the agent skills registry