hw-native-sys/pto-isa/pto-comm-performance-optimization
Claude Code and agent skill by hw-native-sys/pto-isa
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
PTO-COMM 通信算子性能优化方法论与实战技巧。涵盖通算重叠(Overlap)、乒乓双缓冲、多 Block 负载均衡、同步开销优化、数据布局优化、Tile 大小选择、带宽利用率分析、性能建模与 Profiling 方法等。触发:需要优化 PTO-COMM 通信算子性能、分析通信瓶颈、提升带宽利用率、设计通算重叠策略时。
Install
npx vskill@latest install hw-native-sys/pto-isa/pto-comm-performance-optimizationSKILL.md
PTO-COMM 通信算子性能优化指南
定位
本 Skill 是知识库型 + 方法论型 Skill,提供 PTO-COMM 通信算子性能优化的系统方法、关键技巧和分析工具。
性能优化哲学
核心原则
- 隐藏延迟:将通信延迟隐藏在计算中(通算重叠)
- 最大化带宽:让硬件通信通路保持满载(流水线、大块传输)
- 消除瓶颈:识别并消除负载不均衡和同步等待
性能上界
理想状态:通信完全隐藏在计算中,总时间 ≈ 计算时间。
优化优先级
各优化维度详解
优化决策快速参考
场景决策表
| 场景 | 首要优化 | 参考 | |
|---|---|---|---|
| 通信时间 > 计算时间 | 增大计算粒度 / 减少通信量 | overlap-design.md | |
| 计算时间 > 通信时间 | 通信已被隐藏,优化计算本身 | — | |
| Overlap 效率 < 80% | 检查分块粒度、队列空转、Block 均衡 | overlap-design.md | |
| 带宽利用率 < 60% | 增大 Tile、使用乒乓、检查对齐 | data-transfer-optimization.md | |
| 多次 Barrier 开销高 | 合并 RS+Reduce 为 AtomicAdd | sync-algorithm-optimization.md | |
| 首次运行慢 | Warmup 排除首次开销 | profiling-methodology.md |
重叠效率度量
优化检查清单
通算重叠
- [ ] 计算和通信使用不同 Stream
- [ ] 计算完成即入队(不等待全部完成)
- [ ] 通信 kernel 使用 TTEST 轮询(非 TWAIT 阻塞)
- [ ] 分块粒度适当(计算第一个 Tile 前通信有事做)
- [ ] 测量并报告 overlap 效率
数据搬运
- [ ] 大量小块使用乒乓双缓冲
- [ ] Tile 大小充分利用 UB 空间
- [ ] GM 数据 32B 对齐
- [ ] 异步传输使用一维连续布局
同步优化
- [ ] RS + Reduce 融合为 AtomicAdd(减少一次 barrier)
- [ ] 跨 rank 信号仅 block 0 执行,其他 block 等本地标志
- [ ] 避免不必要的 pipe_barrier
- [ ] 使用 TTEST 替代 dcci + 软件轮询
负载均衡
- [ ] AG 阶段使用 row-level 均分
- [ ] RS 阶段队列分配均匀
- [ ] Block 数量与硬件资源匹配
算法层面
- [ ] AllReduce 分解为 RS + AG(消除 root 瓶颈)
- [ ] 数据量大时使用 P2P 组合而非内置集合通信
- [ ] FP16 AtomicAdd 精度可接受,否则改为独立 Reduce
相关 Skills
| Skill | 用途 | |
|---|---|---|
pto-comm-isa-reference | 指令签名与约束速查 | |
pto-comm-operator-develop | 通信算子开发流程 | |
pto-comm-testing-debug | 测试与调试方法 | |
vector-fusion-operator-generate | 向量融合算子开发 |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/pto-comm-performance-optimization/SKILL.md
Popularity
- Repository stars
- 58
- Repository forks
- 40
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hw-native-sys/pto-isa/pto-comm-performance-optimization)