-
Notifications
You must be signed in to change notification settings - Fork 499
54 lines (45 loc) · 1.33 KB
/
test_onnxruntime_gpu.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
name: ONNX Runtime GPU / Python - Test
on:
workflow_dispatch:
schedule:
- cron: 0 7 * * * # every day at 7am UTC
pull_request:
branches:
- main
types:
- opened
- labeled
- reopened
- unlabeled
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
if: ${{
(github.event_name == 'push') ||
(github.event_name == 'workflow_dispatch') ||
contains(github.event.pull_request.labels.*.name, 'gpu') ||
contains(github.event.pull_request.labels.*.name, 'onnxruntime-gpu')
}}
runs-on:
group: aws-g6-4xlarge-plus
container:
image: nvcr.io/nvidia/tensorrt:24.12-py3
options: --gpus all
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip install .[tests,onnxruntime-gpu,diffusers]
- name: Test with pytest
run: |
pytest tests/onnxruntime -m "cuda_ep_test or trt_ep_test" --durations=0 -vvvv -n auto