Add support for amd-smi
to perform device isolation
#41
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: Pytorch ROCm Tests | |
on: | |
workflow_dispatch: | |
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-amd-mi210-dev | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build image | |
run: docker build | |
--file docker/rocm.dockerfile | |
--build-arg USER_ID=$(id -u) | |
--build-arg GROUP_ID=$(id -g) | |
--build-arg ROCM_VERSION=5.6.1 | |
--build-arg TORCH_ROCM=rocm5.6 | |
--tag opt-bench-rocm:5.6.1 | |
. | |
- name: Run tests | |
run: docker run | |
--rm | |
--net host | |
--pid host | |
--shm-size 64G | |
--env USE_ROCM="1" | |
--entrypoint /bin/bash | |
--volume $(pwd):/workspace/optimum-benchmark | |
--workdir /workspace/optimum-benchmark | |
--device /dev/kfd | |
--device /dev/dri/card0 --device /dev/dri/renderD128 | |
--device /dev/dri/card1 --device /dev/dri/renderD129 | |
opt-bench-rocm:5.6.1 | |
-c "pip install -e .[test,peft,diffusers] && pytest -k 'cuda and pytorch' -x" |