Skip to content

[feature][refactor] Better Metrics and Trackers #34

[feature][refactor] Better Metrics and Trackers

[feature][refactor] Better Metrics and Trackers #34

Workflow file for this run

name: API CUDA 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_api_cuda_tests:
strategy:
fail-fast: false
matrix:
image:
[
{ torch_cuda: cu121, cuda_version: 12.1.1 },
{ torch_cuda: cu118, cuda_version: 11.8.0 },
]
runs-on: nvidia-gpu
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build image
run: docker build
--file docker/cuda.dockerfile
--build-arg USER_ID=$(id -u)
--build-arg GROUP_ID=$(id -g)
--build-arg TORCH_CUDA=${{ matrix.image.torch_cuda }}
--build-arg CUDA_VERSION=${{ matrix.image.cuda_version }}
--tag opt-bench-cuda:${{ matrix.image.cuda_version }}
.
- name: Run tests
run: docker run
--rm
--net host
--pid host
--shm-size 64G
--env USE_CUDA="1"
--volume $(pwd):/workspace/optimum-benchmark
--workdir /workspace/optimum-benchmark
--gpus '"device=0,1"'
--entrypoint /bin/bash
opt-bench-cuda:${{ matrix.image.cuda_version }}
-c "pip install -e .[testing,timm,diffusers] && pytest -k 'api and cuda' -x"