排版修改

This commit is contained in:
wu_xy 2026-06-05 15:14:19 +08:00
parent 925a3de34a
commit 50e9a1f8ba
1 changed files with 19 additions and 27 deletions

View File

@ -57,11 +57,13 @@
**环境准备:**
* 已进入赛事专属镜像环境。
**工具准备:**
* 已准备 Agent 工具
* 已配置 Token / API Key
@ -71,6 +73,7 @@
**代码准备:**
* 已获取 Fused MoE Baseline 源码。
@ -129,6 +132,7 @@ EOF
| `Python 3.6.x/ Python 3.7.x` | Python 版本过低 | `conda install python=3.12` 推荐3.10+) |
| `ModuleNotFoundError: numpy` | 当前 Python 缺少依赖 | `pip install numpy torch triton` |
### 步骤 2进入项目目录
**目标:**进入本模块所需的源码目录。
@ -186,9 +190,9 @@ PYTHON_BIN=/path/to/python bash scripts/build_fused_moe_i8_tn_pybind.sh
### 步骤 4正确性测试
**目标:**验证 reference 计算、pybind 计算、Triton 计算这三种方式计算结果的数值是否完全一致。
**目标:** 验证 reference 计算、pybind 计算、Triton 计算这三种方式计算结果的数值是否完全一致。
**操作:**运行 `fused_moe/scripts/run_fused_moe_i8_tn_pybind_test.sh` 脚本
**操作:** 运行 `fused_moe/scripts/run_fused_moe_i8_tn_pybind_test.sh` 脚本
**命令示例:**
@ -208,22 +212,16 @@ bash scripts/run_fused_moe_i8_tn_pybind_test.sh --backend reference
编译成功无报错,输出示例如下:
> pybind:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.69531, C\[last\]=-0.44531
> pybind:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.57813, C\[last\]=-0.49805
> pybind:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.69531, C\[last\]=-0.44531
> pybind:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.57813, C\[last\]=-0.49805
> pybind:fused\_moe\_i8\_tn\_topk3 passed: rows=384, cols=128, sample C\[0\]=-1.08594, C\[last\]=-0.33594
> reference:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.6934, C\[last\]=-0.4451
> reference:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.5768, C\[last\]=-0.4975
> reference:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.6934, C\[last\]=-0.4451
> reference:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.5768, C\[last\]=-0.4975
> reference:fused\_moe\_i8\_tn\_topk3 passed: rows=384, cols=128, sample C\[0\]=-1.0875, C\[last\]=-0.3362
> triton:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.69337, C\[last\]=-0.44513
> triton:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.57678, C\[last\]=-0.49749
> triton:fused\_moe\_i8\_tn\_topk1 passed: rows=256, cols=128, sample C\[0\]=0.69337, C\[last\]=-0.44513
> triton:fused\_moe\_i8\_tn\_topk2 passed: rows=512, cols=128, sample C\[0\]=-0.57678, C\[last\]=-0.49749
> triton:fused\_moe\_i8\_tn\_topk3 passed: rows=384, cols=128, sample C\[0\]=-1.08748, C\[last\]=-0.33618
**结果解释:**
@ -249,9 +247,9 @@ bash scripts/run_fused_moe_i8_tn_pybind_test.sh --backend reference
### 步骤5性能测试
**目标:**输出 benchmark 结果对比表
**目标:** 输出 benchmark 结果对比表
**操作:**运行 `fused_moe/scripts/run_fused_moe_i8_tn_benchmark.sh` 脚本
**操作:** 运行 `fused_moe/scripts/run_fused_moe_i8_tn_benchmark.sh` 脚本
**命令示例:**
@ -267,21 +265,15 @@ bash scripts/run_fused_moe_i8_tn_benchmark.sh --backend all --warmup 5 --iters 2
编译成功无报错,输出示例如下:
> pybind:fused\_moe\_i8\_tn\_topk1 benchmark: avg\_ms=0.308978, TOPS=0.027149, warmup=5, iters=20
> pybind:fused\_moe\_i8\_tn\_topk2 benchmark: avg\_ms=0.304500, TOPS=0.055098, warmup=5, iters=20
> pybind:fused\_moe\_i8\_tn\_topk3 benchmark: avg\_ms=0.297775, TOPS=0.042256, warmup=5, iters=20
> reference:fused\_moe\_i8\_tn\_topk1 benchmark: avg\_ms=1685.43, TOPS=0.000005, warmup=5, iters=20
> reference:fused\_moe\_i8\_tn\_topk2 benchmark: avg\_ms=3384.52, TOPS=0.000005, warmup=5, iters=20
> reference:fused\_moe\_i8\_tn\_topk2 benchmark: avg\_ms=3384.52, TOPS=0.000005, warmup=5, iters=20
> reference:fused\_moe\_i8\_tn\_topk3 benchmark: avg\_ms=2532.14, TOPS=0.000005, warmup=5, iters=20
> triton:fused\_moe\_i8\_tn\_topk1 benchmark: avg\_ms=19.013421, TOPS=0.000441, warmup=5, iters=20
> triton:fused\_moe\_i8\_tn\_topk1 benchmark: avg\_ms=19.013421, TOPS=0.000441, warmup=5, iters=20
> triton:fused\_moe\_i8\_tn\_topk2 benchmark: avg\_ms=16.745914, TOPS=0.001002, warmup=5, iters=20
> triton:fused\_moe\_i8\_tn\_topk3 benchmark: avg\_ms=19.630328, TOPS=0.000641, warmup=5, iters=20
**结果解释:**
@ -416,7 +408,7 @@ bash scripts/run_fused_moe_i8_tn_benchmark.sh --backend all --warmup 5 --iters 2
5. 提交优化任务:点击右下角 \[优化\] 按钮,系统将提交任务并进入 \[生成中\] 状态
![image.png](https://origin.picgo.net/2026/06/04/image659a3f15b96be22c1.png)
![image.png](https://origin.picgo.net/2026/06/04/image659a3f15b96be22c1.png)
完成上述步骤将看到如下界面:
@ -424,7 +416,7 @@ bash scripts/run_fused_moe_i8_tn_benchmark.sh --backend all --warmup 5 --iters 2
### 步骤2任务查看与结果管理
**目标:**在新建优化任务后可追踪任务进度,获取优化结果
**目标:** 在新建优化任务后可追踪任务进度,获取优化结果
**操作:**
@ -457,7 +449,7 @@ bash scripts/run_fused_moe_i8_tn_benchmark.sh --backend all --warmup 5 --iters 2
* 顶部:任务名称、创建/更新时间、适配硬件、当前轮次进度
![image.png](https://origin.picgo.net/2026/06/04/image9e9b23d9b25ddfe25.png)
![image.png](https://origin.picgo.net/2026/06/04/image9e9b23d9b25ddfe25.png)
3. 获取优化结果:当前任务状态为【已完成】时,可在详情页查看优化结果: