Fix tasks #258
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: API ROCm 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_rocm_tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: [{ rocm_version: 5.7.1, torch_rocm: rocm5.7 }] | |
runs-on: [single-gpu, amd-gpu, mi250, ci] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Target devices | |
run: | | |
echo "DEVICE: $DEVICE" | |
echo "DEVICE=$DEVICE" >> $GITHUB_ENV | |
- name: Build image | |
run: docker build | |
--build-arg USER_ID=$(id -u) | |
--build-arg GROUP_ID=$(id -g) | |
--build-arg TORCH_ROCM=${{ matrix.image.torch_rocm }} | |
--build-arg ROCM_VERSION=${{ matrix.image.rocm_version }} | |
--tag opt-bench-rocm:${{ matrix.image.rocm_version }} | |
docker/rocm | |
- name: Run tests | |
uses: addnab/docker-run-action@v3 | |
env: | |
DEVICE: ${{ env.DEVICE }} | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
with: | |
image: opt-bench-rocm:${{ matrix.image.rocm_version }} | |
options: | | |
--rm | |
--pid host | |
--shm-size 64G | |
--env HF_TOKEN | |
--device /dev/kfd | |
--device /dev/dri/${{ env.DEVICE }} | |
--volume ${{ github.workspace }}:/workspace | |
--workdir /workspace | |
run: | | |
pip install -e .[testing,timm,diffusers] | |
hugingface-cli login --token $HF_TOKEN | |
pytest -s -x -k "api and cuda" |