triton-operator-performance-eval

Installation
SKILL.md

Triton 算子性能评估(Ascend NPU)

核心原则

只相信 msprof 数据,不凭直觉。

性能比(Ratio)定义Ratio = torch_npu 耗时 / Triton 耗时。Ratio > 1.0 表示 Triton 更快,Ratio < 1.0 表示更慢。不是耗时的直接比值,而是耗时的倒数。目标通常为 Ratio ≥ 1.0x。

唯一可信采集方式:msprof(函数级)和 msprof op(算子级)。其他方式(time.time()torch.npu.Eventdo_bench等)因包含 Host 开销且精度不足,绝对不可用于性能评估

命令 用途 典型场景
msprof --application="python x.py" 函数级:多算子对比、全链路分析 "哪个算子最慢?"
msprof op --kernel-name=K python x.py 算子级:硬件利用率、Bank Conflict "这个 kernel 为什么慢?"

决策:先 msprof 定位热点,再 msprof op 深度分析。

参考资源加载

Related skills

More from ascend/agent-skills

Installs
52
GitHub Stars
14
First Seen
Apr 3, 2026