65 lines
1.7 KiB
Markdown
65 lines
1.7 KiB
Markdown
|
|
# FlagOS S2 提交 PR 模板(给队长孙蓓)
|
|||
|
|
|
|||
|
|
> 复制下面这块,直接贴到 GitHub PR 描述里
|
|||
|
|
|
|||
|
|
```markdown
|
|||
|
|
## What
|
|||
|
|
|
|||
|
|
Optimized `[算子名]` operator for FlagOS Open Computing Challenge S2 - Track 1.
|
|||
|
|
|
|||
|
|
Baseline: `FlagOpen/FlagGems/[原文件路径]`
|
|||
|
|
This PR: `FlagOpen/FlagGems/[新文件路径]`
|
|||
|
|
|
|||
|
|
## Why
|
|||
|
|
|
|||
|
|
The baseline uses `[默认配置 / sequential for-loop / fixed num_warps]`.
|
|||
|
|
This PR adds `[autotune / 2D grid / 3D grid / 头维并行]` to extract
|
|||
|
|
additional `[1.X% / X 倍]` speedup.
|
|||
|
|
|
|||
|
|
## How
|
|||
|
|
|
|||
|
|
1. Added `triton.autotune` over `(BLOCK_SIZE, num_warps, num_stages)` with N configs
|
|||
|
|
2. Restructured grid from `[1D / 2D]` to `[2D / 3D]` for `[维度]` parallelization
|
|||
|
|
3. Constexpr inlined `[常量]` for `[省 Python→Triton 转换 / 减少指令]`
|
|||
|
|
|
|||
|
|
## Benchmarks
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
shape baseline(ms) v2(ms) speedup
|
|||
|
|
[B, S, H, D] X.XXXX X.XXXX X.XXx
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
GPU: NVIDIA A100 80GB
|
|||
|
|
Triton: 3.0.0
|
|||
|
|
PyTorch: 2.3.0
|
|||
|
|
FlagGems: master @ commit [hash]
|
|||
|
|
|
|||
|
|
## Tests
|
|||
|
|
|
|||
|
|
- [x] Numerical correctness vs PyTorch reference (max abs_diff < 1e-2)
|
|||
|
|
- [x] Numerical correctness vs FlagGems baseline (max abs_diff < 1e-2)
|
|||
|
|
- [x] Tested on fp16 / bf16 / fp32
|
|||
|
|
- [x] Tested on multiple shapes
|
|||
|
|
|
|||
|
|
## Team
|
|||
|
|
|
|||
|
|
GuanghuLab · 孙蓓(队长)· 9478_apiqttc · 陈淑婷 · 4348_apiratk · 8592_apivqhj
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
|
|||
|
|
# flagos.net 平台提交模板
|
|||
|
|
|
|||
|
|
```
|
|||
|
|
参赛赛道: 赛道一 · SGLang 框架算子在多款芯片的性能优化
|
|||
|
|
赛题编号: Task XX
|
|||
|
|
赛题名称: [算子名]
|
|||
|
|
GitHub PR: https://github.com/FlagOpen/FlagGems/pull/XXX
|
|||
|
|
提交说明:
|
|||
|
|
- 团队:GuanghuLab
|
|||
|
|
- 优化要点:[2-3 行说明]
|
|||
|
|
- 加速比:[X.XX×]
|
|||
|
|
- 测试设备:[NVIDIA A100 80GB / 国产 XX 芯片]
|
|||
|
|
- 备注:[可选:跑了哪些 shape,dtype 等]
|
|||
|
|
```
|