Commit 2e62ca5f authored by wh1225's avatar wh1225 💬
Browse files

Update README.md

parent ad89cb8a
# RCCL Auto-Tuning # RCCL Auto-Tuning
自动化 RCCL 性能调优工具,通过测试不同算法和协议组合,自动选择最优配置并修改 RCCL 源码。 自动化 RCCL 性能调优工具,通过测试不同算法和协议组合,自动选择最优配置并修改 RCCL 源码。
## 简介 ## 简介
RCCL (ROCm Communication Collectives Library) 是 AMD 为 GPU 提供的标准集合通信库,实现了 all-reduce、all-gather、reduce、broadcast、reduce-scatter、gather、scatter 和 all-to-all 等通信原语。本项目通过自动化测试和性能分析,为特定硬件配置和通信模式找到最优的算法和协议组合,并自动修改 RCCL 源码以应用这些优化。 RCCL (ROCm Communication Collectives Library) 是 AMD 为 GPU 提供的标准集合通信库,实现了 all-reduce、all-gather、reduce、broadcast、reduce-scatter、gather、scatter 和 all-to-all 等通信原语。本项目通过自动化测试和性能分析,为特定硬件配置和通信模式找到最优的算法和协议组合,并自动修改 RCCL 源码以应用这些优化。
## 参考链接 ## 参考链接
- [RCCL-DTK-25.04 官方仓库](http://112.11.119.99:10068/dcutoolkit/deeplearing/rccl) - [RCCL-DTK-25.04 官方仓库](http://112.11.119.99:10068/dcutoolkit/deeplearing/rccl)
- [RCCL-Tests 官方仓库](https://github.com/ROCm/rccl-tests) - [RCCL-Tests 官方仓库](https://github.com/ROCm/rccl-tests)
- [RCCL 官方文档](https://rocm.docs.amd.com/projects/rccl/en/latest/) - [RCCL 官方文档](https://rocm.docs.amd.com/projects/rccl/en/latest/)
## 项目结构 ## 项目结构
``` ```
rccl-auto-tuning/ rccl-auto-tuning/
├── rccl-dtk-25.04/ # RCCL 通信库源代码 ├── rccl-dtk-25.04/ # RCCL 通信库源代码
├── rccl-test/ # RCCL 性能测试程序 ├── rccl-test/ # RCCL 性能测试程序
└── scripts/ # 自动化调优脚本 └── scripts/ # 自动化调优脚本
├── run.sh # 主运行脚本 ├── run.sh # 主运行脚本
├── single_process.sh # 单进程执行脚本 ├── single_process.sh # 单进程执行脚本
├── panduan.py # 性能分析脚本 ├── panduan.py # 性能分析脚本
├── parse_qz_and_modify_tuning.py # 自动修改 tuning.cc ├── parse_qz_and_modify_tuning.py # 自动修改 tuning.cc
├── hosts # 主机列表配置 ├── hosts # 主机列表配置
└── topo-input.xml # 拓扑配置文件 └── topo-input.xml # 拓扑配置文件
``` └── shuju.txt # 测试数据集结果
## 环境要求 └── qz.txt # 记录可优化数据
```
### 硬件要求 ## 环境要求
- ROCm 支持的 AMD GPU
- 支持 PCIe、xGMI 或 InfiniBand 互连的多 GPU 系统 ### 硬件要求
- ROCm 支持的 AMD GPU
### 软件要求 - 支持 PCIe、xGMI 或 InfiniBand 互连的多 GPU 系统
- ROCm 软件栈 (包含 HIP runtime 和 HIP-Clang)
## 快速开始 ### 软件要求
- ROCm 软件栈 (包含 HIP runtime 和 HIP-Clang)
### 1. 克隆仓库 ## 快速开始
```bash ### 1. 克隆仓库
git clone http://developer.sourcefind.cn/codes/wh1225/rccl-auto-tuning.git
cd rccl-auto-tuning ```bash
``` git clone http://developer.sourcefind.cn/codes/wh1225/rccl-auto-tuning.git
cd rccl-auto-tuning
### 2. 编译 RCCL ```
```bash ### 2. 编译 RCCL
cd rccl-dtk-25.04
rm -rf build ```bash
mkdir build cd rccl-dtk-25.04
cd build rm -rf build
CXX=hipcc cmake .. mkdir build
make -j cd build
``` CXX=hipcc cmake ..
make -j
### 3. 编译 RCCL-Test ```
```bash ### 3. 编译 RCCL-Test
cd rccl-test
make MPI=1 ```bash
``` cd rccl-test
make MPI=1
编译完成后,测试程序会生成在 `rccl-test/build/` 目录下。 ```
## 使用方法 编译完成后,测试程序会生成在 `rccl-test/build/` 目录下。
### 1. 配置主机列表 ## 使用方法
编辑 `scripts/hosts` 文件,添加你的计算节点: ### 1. 配置主机列表
``` 编辑 `scripts/hosts` 文件,添加你的计算节点:
node1
node2 ```
node3 node1
``` node2
node3
### 2. 运行自动调优 ```
```bash ### 2. 运行自动调优
cd scripts
./run.sh hosts 1 ```bash
``` cd scripts
./run.sh hosts 1
## 输出文件 ```
- `shuju.txt`: 原始性能测试数据 ## 输出文件
- `qz.txt`: 性能分析结果和优化建议
- `shuju.txt`: 原始性能测试数据
- `qz.txt`: 性能分析结果和优化建议
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment