-
Notifications
You must be signed in to change notification settings - Fork 487
65 lines (55 loc) · 1.57 KB
/
test_fx_automatic_parallel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Automatic Model Parallelism Test on GPUs
on:
pull_request:
branches:
- main
paths:
- 'optimum/fx/parallelization/**.py'
push:
branches:
- main
paths:
- 'optimum/fx/parallelization/**.py'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run_gpu_tests:
strategy:
fail-fast: false
matrix:
config:
- name: GPU-enabled Optimum Test Suite
image: nvidia/cuda:12.4.1-devel-ubuntu22.04
gpu_target: ["nvidia-multi-gpu-l4-runners", "nvidia-multi-gpu-a10-runners"]
name: ${{ matrix.config.name }}
runs-on:
group: "${{matrix.gpu_target}}"
container:
image: ${{ matrix.config.image }}
options: --mount type=tmpfs,destination=/tmp --shm-size 64gb --gpus all --ipc host -v /mnt/hf_cache:/mnt/cache/
env:
NCCL_DEBUG: INFO
HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }}
defaults:
run:
shell: bash
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Checkout optimum
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run nvidia-smi
run: |
nvidia-smi
- name: Install dependencies
run: |
python3 -m pip install -U pip
python3 -m pip install torch transformers
python3 -m pip install .[tests]
- name: Run automatic model parallelism tests
run: |
pytest -s -v -o log_cli=true tests/fx/parallelization