1- name : Run Container and Execute Tests
1+ name : Perf Tests in Container
22
33on :
44 push :
88 branches :
99 - main
1010
11+ env :
12+ MPI_HOME : /usr/local/mpi
13+ PERF_BIN : /__w/FlagCX/FlagCX/test/perf/host_api/build/bin
14+
1115jobs :
12- test-in-container :
16+ perf-test :
1317 runs-on : [self-hosted, cx-build]
1418 container :
1519 image : localhost:5000/flagscale:cuda12.8.1-cudnn9.7.1-python3.12-torch2.7.0-time2507111538
@@ -32,42 +36,70 @@ jobs:
3236 submodules : true
3337 set-safe-directory : true
3438
35- - name : Set up Python and Install Dependencies
39+ - name : Build FlagCX
3640 run : |
37- apt update -y
38- apt-get install -y python3 python3-pip python3-venv git
39- python3 -m venv venv
40- . venv/bin/activate
4141 cd /__w/FlagCX/FlagCX
42- git config --global --add safe.directory /__w/FlagCX/FlagCX
43- pip install setuptools pre-commit
44- pre-commit install
42+ make -j$(nproc) USE_NVIDIA=1
43+
44+ - name : Build perf tests
45+ run : |
46+ cd /__w/FlagCX/FlagCX/test/perf
47+ make -j$(nproc) USE_NVIDIA=1
4548
46- - name : Run Code Format Check with pre-commit
49+ - name : Wait for GPU
50+ shell : bash
4751 run : |
4852 cd /__w/FlagCX/FlagCX
49- . venv/bin/activate
50- apt update -y
51- apt-get install clang-format -y
52- git fetch --all
53- if [ -n "$GITHUB_HEAD_REF" ] && [ -n "$GITHUB_BASE_REF" ]; then
54- from_ref="origin/$GITHUB_HEAD_REF"
55- to_ref="origin/$GITHUB_BASE_REF"
56- echo "From reference: $from_ref; To reference: $to_ref"
57- pre-commit run --from-ref "$from_ref" --to-ref "$to_ref"
58- fi
59- continue-on-error : false
53+ source test/script/_gpu_check.sh
54+ wait_for_gpu
55+
56+ - name : " Perf tests (homoRunner)"
57+ run : |
58+ export PATH=$MPI_HOME/bin:$PATH
59+ export LD_LIBRARY_PATH=/__w/FlagCX/FlagCX/build/lib:$LD_LIBRARY_PATH
60+ set -e
61+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_alltoall -b 128M -e 1G -f 2 -p 1
62+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_alltoallv -b 128M -e 1G -f 2 -p 1
63+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_sendrecv -b 128M -e 1G -f 2 -p 1
64+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_allreduce -b 128M -e 1G -f 2 -p 1
65+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_allgather -b 128M -e 1G -f 2 -p 1
66+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_reducescatter -b 128M -e 1G -f 2 -p 1
67+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_broadcast -b 128M -e 1G -f 2 -r 0 -p 1
68+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_gather -b 128M -e 1G -f 2 -r 0 -p 1
69+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_scatter -b 128M -e 1G -f 2 -r 0 -p 1
70+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_reduce -b 128M -e 1G -f 2 -r 0 -p 1
6071
61- - name : Check the current working directory
72+ - name : " Perf tests (uniRunner) "
6273 run : |
63- echo "Current directory: $(pwd)"
64- ls -l ./test/script
74+ export PATH=$MPI_HOME/bin:$PATH
75+ export LD_LIBRARY_PATH=/__w/FlagCX/FlagCX/build/lib:$LD_LIBRARY_PATH
76+ set -e
77+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_alltoall -b 128M -e 1G -f 2 -p 1
78+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_alltoallv -b 128M -e 1G -f 2 -p 1
79+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_sendrecv -b 128M -e 1G -f 2 -p 1
80+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_allgather -b 128M -e 1G -f 2 -p 1
81+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_broadcast -b 128M -e 1G -f 2 -r 0 -p 1
82+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_gather -b 128M -e 1G -f 2 -r 0 -p 1
83+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_scatter -b 128M -e 1G -f 2 -r 0 -p 1
6584
66- - name : Ensure script has execute permissions
67- run : chmod +x /__w/FlagCX/FlagCX/test/script/auto_script.sh
85+ - name : " Registration -R 1 (homoRunner)"
86+ run : |
87+ export PATH=$MPI_HOME/bin:$PATH
88+ export LD_LIBRARY_PATH=/__w/FlagCX/FlagCX/build/lib:$LD_LIBRARY_PATH
89+ mpirun -np 8 --allow-run-as-root $PERF_BIN/perf_allreduce -b 128M -e 1G -f 2 -p 1 -R 1
6890
69- - name : Run Auto Test Script in Container
91+ - name : " Registration -R 1 (uniRunner P2P) "
7092 run : |
71- cd /__w/FlagCX/FlagCX
72- ./test/script/auto_script.sh
93+ export PATH=$MPI_HOME/bin:$PATH
94+ export LD_LIBRARY_PATH=/__w/FlagCX/FlagCX/build/lib:$LD_LIBRARY_PATH
95+ set -e
96+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_VMM_ENABLE=0 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_sendrecv -b 128M -e 1G -f 2 -p 1 -R 1
97+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_VMM_ENABLE=0 -x FLAGCX_USE_HETERO_COMM=1 $PERF_BIN/perf_alltoall -b 128M -e 1G -f 2 -p 1 -R 1
7398
99+ - name : " Registration -R 1 (uniRunner NET)"
100+ run : |
101+ export PATH=$MPI_HOME/bin:$PATH
102+ export LD_LIBRARY_PATH=/__w/FlagCX/FlagCX/build/lib:$LD_LIBRARY_PATH
103+ set -e
104+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_VMM_ENABLE=0 -x FLAGCX_USE_HETERO_COMM=1 -x FLAGCX_P2P_DISABLE=1 $PERF_BIN/perf_sendrecv -b 128M -e 1G -f 2 -p 1 -R 1
105+ mpirun -np 8 --allow-run-as-root -x FLAGCX_MEM_ENABLE=1 -x FLAGCX_VMM_ENABLE=0 -x FLAGCX_USE_HETERO_COMM=1 -x FLAGCX_P2P_DISABLE=1 $PERF_BIN/perf_alltoall -b 128M -e 1G -f 2 -p 1 -R 1
0 commit comments