可评估 AllGather、ReduceScatter 等集合通信算子在不同集群规模和数据量下的耗时与算法带宽,支持多种执行策略与算法模板,输出结果可展示在控制台或 Excel。【此简介由AI生成】
| Files | Last commit | Last update |
|---|
| add concurrent executor | 3 months ago |
| add concurrent executor | 3 months ago |
| feat: add SeqExecutor with bandwidth-based data split, replace old SequenceExecutor | 4 months ago |
| add concurrent executor | 3 months ago |
| add concurrent executor | 3 months ago |
| feat: add AllToAll-specific CLOS bandwidth utilization table (ub_clos_util_a2a) | 4 months ago |
| feat: add AllToAll operator, remove CLOS_BW from config, fix NHR ReduceScatter formula - Add AllToAll template and operator (requirement.md lines 117-127) - AllToAll always uses single template regardless of executor type - Remove CLOS_PORT_NUM and CLOS_BW from config.py - clos_bw now comes from CLI --closPortNum, default 8*CLOS_PHY_BANDWIDTH - Fix clos_bw propagation: AllToAll operator passes clos_bw to template - Fix ParallelExecutor DEFAULT_CLOS_BW NameError bug - Fix NHR ReduceScatter transfer formula: step_data = d_t // 2^(step+1) - Add .gitignore to exclude __pycache__ - Remove tracked __pycache__ files from git | 4 months ago |
| add concurrent executor | 3 months ago |
| feat: refactor SoleExecutor with op_type dispatch, add MeshAllToAllTemplate for AllToAll sole evaluation | 4 months ago |
| feat: add AllToAll-specific CLOS bandwidth utilization table (ub_clos_util_a2a) | 4 months ago |
| add concurrent executor | 3 months ago |
| add concurrent executor | 3 months ago |
| add concurrent executor | 3 months ago |
| feat: add SeqExecutor with bandwidth-based data split, replace old SequenceExecutor | 4 months ago |
| add concurrent executor | 3 months ago |
| feat: add SeqExecutor p=1 support — AllGather/ReduceScatter use NHR with p=n, AllToAll uses MeshAllToAllTemplate | 4 months ago |
集合通信算子理论性能评估工具,用于评估 AllGather、ReduceScatter、AllReduce、AllToAll 算子在不同集群规模和数据量下的耗时与算法带宽。
项目结构
performanceEstimate/
├── main.py # 入口,CLI 参数解析
├── config.py # 全局常量(物理带宽、延迟、HBM 带宽)
├── operators/ # 算子定义(AllGather, ReduceScatter, AllReduce, AllToAll)
├── executors/ # 执行策略(sole, seq, parallel)
├── templates/ # 算法模板(nhr_allgather, mesh_allgather, nhr_reducescatter, mesh_reducescatter, alltoall)
├── utils/ # 工具函数(带宽利用率查询、数据量解析、日志)
├── output/ # 输出方式(控制台、Excel)
├── tests/ # 单元测试
└── run.sh # 示例脚本
使用方法
python main.py --opType <算子类型> -n <卡数> [-p <server数>] [--dataSize <数据量>] [--executorType <算法类型>] [--output <输出方式>]
参数说明
| 参数 |
说明 |
必填 |
默认值 |
--opType |
算子类型:AllGather / ReduceScatter / AllReduce / AllToAll / ALL |
是 |
- |
-n |
单 server 卡数 |
是 |
- |
-p |
server 数 |
否 |
1 |
-s |
超节点数 |
否 |
1 |
--closPortNum |
Clos 端口数量 |
否 |
8 |
--dataSize |
数据量,支持单个值(1GB)或范围(1k-8k) |
否 |
1GB |
--executorType |
算法类型:sole / sequence / parallel / concurrent |
否 |
parallel |
--executor_args |
执行器参数,parallel 需要 ratio=0.5,sequence 需要 closPortNum |
否 |
ratio=0.5 |
--output |
输出方式:console / excel |
否 |
console |
--outputFile |
Excel 输出文件名 |
否 |
result.xlsx |
--verbose |
输出详细计算过程 |
否 |
False |
示例
python main.py --opType ALL -n 8 -p 16 --closPortNum 8 --dataSize 1G --verbose
python main.py --opType AllGather -n 8 --output excel --outputFile result.xlsx
python main.py --opType ReduceScatter -n 8 -p 4 --dataSize 1m-128m
python main.py --opType ALL -n 8 -p 8 --executorType sequence --closPortNum 4 --dataSize 1G
执行策略说明
| 执行策略 |
说明 |
parallel |
两维度并发,按 ratio 切分数据,先 mesh+nhr 并发,再反向并发,耗时取 max |
sequence |
SeqExecutor,第一步单维度模板,第二步按带宽比例 (n-1):closPortNum 切分后 mesh+nhr 并发 |
concurrent |
单 server 内 mesh+clos 链路并发,按带宽比例 (n-1):closPortNum 自动切分,耗时取 max,仅使用 n |
sole |
单模板执行,仅使用 mesh 链路 |
运行测试
pytest tests/
可评估 AllGather、ReduceScatter 等集合通信算子在不同集群规模和数据量下的耗时与算法带宽,支持多种执行策略与算法模板,输出结果可展示在控制台或 Excel。【此简介由AI生成】
Customize your domain