Add support for amd-smi
to perform device isolation
#49
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OnnxRuntime TensorRT Inference 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_image_and_run_gpu_tests: | |
runs-on: hf-dgx-01 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build image | |
run: docker build | |
--file docker/tensorrt.dockerfile | |
--build-arg USER_ID=$(id -u) | |
--build-arg GROUP_ID=$(id -g) | |
--build-arg TENSORRT_VERSION=22.12 | |
--build-arg TORCH_CUDA=cu118 | |
--tag opt-bench-tensorrt:22.12 | |
. | |
- name: Run tests | |
run: docker run | |
--rm | |
--gpus '"device=0,1"' | |
--entrypoint /bin/bash | |
--volume $(pwd):/workspace/optimum-benchmark | |
--workdir /workspace/optimum-benchmark | |
--env USE_CUDA="1" | |
opt-bench-tensorrt:22.12 | |
-c "pip install -e .[test,onnxruntime-gpu,diffusers] && pytest -k 'tensorrt and onnxruntime and inference' -x" |