# 基线测试脚本 **Repository Path**: penguin-upper-body/baseline-testing-script ## Basic Information - **Project Name**: 基线测试脚本 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-16 - **Last Updated**: 2025-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Synopic Baseline 昇腾部分算子的调用示例。 | 算子 | 路径 | 备注 | | :-: | :-: | :- | | All Gather Matmul | 00_allgather_matmul | 包括直接调用ATB中LCOC通算融合算子(LinearParallel)的示例,以及单独调用ATB中LCCL通信算子(AllGather)的示例 | | Matmul All Reduce | 01_matmul_allreduce | 包括直接调用ATB中LCOC通算融合算子(LinearParallel)的示例,以及单独调用ATB中LCCL通信算子(AllReduce)的示例 | | Matmul Reduce Scatter | 02_matmul_reducescatter | 包括直接调用ATB中LCOC通算融合算子(LinearParallel)的示例,以及单独调用ATB中LCCL通信算子(ReduceScatter)的示例 | | Grouped Matmul All to Allv | 03_grouped_matmul_alltoallv | 暂未实现,待NNAL提供对应算子接口 | ## 环境准备 - CANN: 8.2.RC1.alpha002 - 需要安装CANN中的toolkit、kernels-910b、nnal三个包,具体安装方法见[官方文档](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha002/index/index.html)。 - Open MPI - 用于简化多进程写法 ## 示例运行 ### 编译对应目标 应用CANN环境变量 ```shell source /your/cann/path/ascend-toolkit/set_env.sh source /your/cann/path/nnal/atb/set_env.sh ``` 编译对应目标 ```shell mkdir build cmake -B build -S . cmake --build build --target [target] ``` 这里可以使用help来查看所有可以选择的目标 ```shell cmake --build build --target help ``` ### 运行程序 对于通信算子,需要使用`mpirun`命令来启动多进程程序,以Matmul All Reduce为例: 测试lcoc算子 参数 -m -n -k ```shell mpirun -np 2 ./build/bin/01_test_lcoc_matmul_allreduce 128 256 256 ``` 测试lccl算子 lccl算子目前只有通讯过程,只涉及一个矩阵,参数n无效 参数 -m -n -k ```shell mpirun -np 2 ./build/bin/00_test_lccl_allgather 128 256 256 ``` ### 批量性能测试