Skip to content

Commit dca747b

Browse files
authored
Update GitHub Actions workflow for testing on GPUs
1 parent ad2c79e commit dca747b

File tree

1 file changed

+90
-8
lines changed

1 file changed

+90
-8
lines changed

.github/workflows/test.yml

Lines changed: 90 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,95 @@
1-
name: Actions Runner Controller Demo
2-
on: [push]
1+
name: Run Tests on gpu and iluvatar
2+
on: push
33

44
jobs:
5-
Explore-GitHub-Actions:
6-
# You need to use the INSTALLATION_NAME from the previous step
7-
runs-on: bj-gpu-03
5+
upload_on_gpu:
6+
name: Upload on bj-gpu-03 runner
7+
runs-on: [bj-gpu-03]
88
container:
99
image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-ixuca:latest
1010
steps:
11-
- run: echo "🎉 This job uses runner scale set runners!"
12-
- run: sleep 3600
13-
- run: echo 'pwd'
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Setup Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.10"
18+
19+
- name: Install dependencies (bj-gpu-03)
20+
shell: bash
21+
run: |
22+
set -euxo pipefail
23+
pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu118/
24+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
25+
pip install func_timeout pandas pebble pynvml pyyaml
26+
- name: Run EngineV2 (upload on bj-gpu-03)
27+
shell: bash
28+
run: |
29+
set -euxo pipefail
30+
python engineV2.py \
31+
--custom_device_vs_gpu=True \
32+
--custom_device_vs_gpu_mode=upload \
33+
--random_seed=712 \
34+
--api_config_file="tests/test.txt" \
35+
--num_gpus=-1 \
36+
--num_workers_per_gpu=1 \
37+
--required_memory=10.0
38+
- name: Package logs (bj-gpu-03)
39+
if: always()
40+
shell: bash
41+
run: |
42+
set -euxo pipefail
43+
tar -czf test_log.tar.gz tester/api_config/test_log
44+
- name: Upload test logs artifact (bj-gpu-03)
45+
if: always()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: test_log_bj-gpu-03
49+
path: test_log.tar.gz
50+
51+
download_on_iluvatar:
52+
name: Download on iluvatar-gpu-2-1 runner
53+
runs-on: [iluvatar-gpu-2-1]
54+
needs: upload_on_gpu
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
59+
- name: Setup Python
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: "3.10"
63+
64+
- name: Install dependencies (iluvatar-gpu-2-1)
65+
shell: bash
66+
run: |
67+
set -euxo pipefail
68+
pip install func_timeout pandas pebble pynvml pyyaml
69+
python -m pip install paddlepaddle==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
70+
python -m pip install paddle-iluvatar-gpu==3.2.1 -i https://www.paddlepaddle.org.cn/packages/stable/ixuca/
71+
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
72+
- name: Run EngineV2 (download on iluvatar-gpu-2-1)
73+
shell: bash
74+
run: |
75+
set -euxo pipefail
76+
python engineV2.py \
77+
--custom_device_vs_gpu=True \
78+
--custom_device_vs_gpu_mode=download \
79+
--random_seed=712 \
80+
--api_config_file="tests/test.txt" \
81+
--num_gpus=-1 \
82+
--num_workers_per_gpu=1 \
83+
--required_memory=10.0
84+
- name: Package logs (iluvatar-gpu-2-1)
85+
if: always()
86+
shell: bash
87+
run: |
88+
set -euxo pipefail
89+
tar -czf test_log.tar.gz tester/api_config/test_log
90+
- name: Upload test logs artifact (iluvatar-gpu-2-1)
91+
if: always()
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: test_log_iluvatar-gpu-2-1
95+
path: test_log.tar.gz

0 commit comments

Comments
 (0)