-
Notifications
You must be signed in to change notification settings - Fork 56
37 lines (32 loc) · 1.03 KB
/
test_cuda_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
name: Pytorch CUDA Tests
on:
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: self-hosted
steps:
- name: Restore files ownership
run: docker run
--rm
--entrypoint /bin/bash
--env HOST_UID=`id -u`
--env HOST_GID=`id -g`
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
ubuntu
-c 'chown -R ${HOST_UID}:${HOST_GID} /workspace/optimum-benchmark'
- name: Checkout
uses: actions/checkout@v2
- name: Run tests
run: docker run
--rm
--entrypoint /bin/bash
--gpus '"device=0,1"'
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
optimum-benchmark-gpu
-c "pip install -e .[test,peft,diffusers] && pytest -k 'cuda_pytorch' -x"