diff --git a/.github/workflows/test_api_rocm.yaml b/.github/workflows/test_api_rocm.yaml index 0f18d25a..90cf2103 100644 --- a/.github/workflows/test_api_rocm.yaml +++ b/.github/workflows/test_api_rocm.yaml @@ -26,18 +26,21 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: - setup_rocm_docker_devices: + setup_docker_devices: runs-on: [self-hosted, amd-gpu, single-gpu, mi250] container: image: ghcr.io/huggingface/optimum-benchmark:latest-rocm options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ --device /dev/kfd --device /dev/dri --env ROCR_VISIBLE_DEVICES + outputs: + docker_devices: ${{ steps.rocm_docker_devices.outputs.rocm_docker_devices }} + steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up ROCM_DOCKER_DEVICES env var + - name: Run script to get devices run: | chmod +x scripts/rocm_docker_devices.sh ./scripts/rocm_docker_devices.sh @@ -45,19 +48,19 @@ jobs: - name: Set outputs # use script to get the devices id: rocm_docker_devices - run: echo "rocm_docker_devices=$(./scripts/rocm_docker_devices.sh)" >> $GITHUB_OUTPUT + run: echo "ROCM_DOCKER_DEVICES=$(./scripts/rocm_docker_devices.sh)" >> "$GITHUB_OUTPUT" - name: Print outputs run: echo "${{ steps.rocm_docker_devices.outputs.rocm_docker_devices }}" run_api_rocm_tests: - needs: setup_rocm_docker_devices + needs: setup_docker_devices runs-on: [self-hosted, amd-gpu, single-gpu, mi250] container: image: ghcr.io/huggingface/optimum-benchmark:latest-rocm - options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ ${{ needs.setup_rocm_docker_devices.outputs.rocm_docker_devices }} --env ROCR_VISIBLE_DEVICES + options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ ${{ needs.setup_docker_devices.outputs.docker_devices }} --env ROCR_VISIBLE_DEVICES steps: - name: Checkout