-
Notifications
You must be signed in to change notification settings - Fork 48
63 lines (55 loc) · 1.75 KB
/
test_cli_rocm_pytorch_single_gpu.yaml
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
name: CLI ROCm Pytorch Single-GPU Tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- .github/workflows/test_cli_rocm_pytorch_single_gpu.yaml
- "optimum_benchmark/**"
- "docker/**"
- "tests/**"
- "setup.py"
pull_request:
branches:
- main
paths:
- .github/workflows/test_cli_rocm_pytorch_single_gpu.yaml
- "optimum_benchmark/**"
- "docker/**"
- "tests/**"
- "setup.py"
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
env:
IMAGE: ghcr.io/huggingface/optimum-benchmark:latest-rocm
jobs:
run_cli_rocm_pytorch_single_gpu_tests:
runs-on: [single-gpu, amd-gpu, mi250, ci]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set target devices
run: |
echo "DEVICE:$DEVICE"
echo "DEVICE=$DEVICE" >> $GITHUB_ENV
- name: Unroot docker image
run: |
docker build --build-arg IMAGE=${{ env.IMAGE }} --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) -t ${{ env.IMAGE }}-unroot docker/unroot
- name: Run tests
uses: addnab/docker-run-action@v3
env:
DEVICE: ${{ env.DEVICE }}
with:
image: ${{ env.IMAGE }}-unroot
options: |
--rm
--shm-size 64G
--device /dev/kfd
--device /dev/dri/${{ env.DEVICE }}
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
run: |
pip install -e .[testing,diffusers,timm,peft,autoawq,auto-gptq]
pytest -x -s -k "cli and cuda and pytorch and not (dp or ddp or device_map or deepspeed) and not (bnb or awq)"