-
Notifications
You must be signed in to change notification settings - Fork 48
54 lines (48 loc) · 1.64 KB
/
test_cli_rocm_pytorch.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
name: CLI ROCm Pytorch Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_image_and_run_cli_rocm_pytorch_tests:
strategy:
fail-fast: false
matrix:
image:
[
{ torch_rocm: rocm5.6, torch_pre_release: 0, rocm_version: 5.6.1 },
{ torch_rocm: rocm5.7, torch_pre_release: 1, rocm_version: 5.7.1 },
]
runs-on: [amd-gpu]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build image
run: docker build
--file docker/rocm.dockerfile
--build-arg USER_ID=$(id -u)
--build-arg GROUP_ID=$(id -g)
--build-arg TORCH_ROCM=${{ matrix.image.torch_rocm }}
--build-arg TORCH_PRE_RELEASE=${{ matrix.image.torch_pre_release }}
--build-arg ROCM_VERSION=${{ matrix.image.rocm_version }}
--tag opt-bench-rocm:${{ matrix.image.rocm_version }}
.
- name: Run tests
run: docker run
--rm
--pid host
--shm-size 64G
--env USE_ROCM="1"
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
--device /dev/kfd
--device /dev/dri/renderD128
--device /dev/dri/renderD129
--entrypoint /bin/bash
opt-bench-rocm:${{ matrix.image.rocm_version }}
-c "pip install -e .[testing,diffusers,timm,deepspeed,peft] && pytest -k 'cli and cuda and pytorch' -x"