-
Notifications
You must be signed in to change notification settings - Fork 48
54 lines (48 loc) · 1.56 KB
/
test_cli_rocm_onnxruntime.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 OnnxRuntime 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_onnxruntime_tests:
runs-on: amd-gpu
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check if image exists
id: check_image
run: |
if [[ "$(docker images -q opt-bench-rocm-ort:5.7 2> /dev/null)" == "" ]]; then
echo "::set-output name=exists::false"
else
echo "::set-output name=exists::true"
fi
- name: Build image if image does not exist
if: steps.check_image.outputs.exists == 'false'
run: docker build
--file docker/rocm-ort.dockerfile
--build-arg USER_ID=$(id -u)
--build-arg GROUP_ID=$(id -g)
--build-arg ROCM_VERSION=5.7
--tag opt-bench-rocm-ort:5.7
.
- name: Run tests
run: docker run
--rm
--net host
--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-ort:5.7
-c "pip install -e .[testing,timm,diffusers] && pytest -k 'cli and rocm and onnxruntime' -x"