| # Copyright 2024 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| name: PkgCI Test PJRT plugin |
| on: |
| workflow_call: |
| inputs: |
| artifact_run_id: |
| type: string |
| default: "" |
| workflow_dispatch: |
| inputs: |
| artifact_run_id: |
| type: string |
| default: "" |
| |
| jobs: |
| build_and_test: |
| strategy: |
| matrix: |
| include: |
| - runner: ubuntu-24.04 |
| pjrt_platform: cpu |
| # TODO: cuda runner is not available yet, refer to #18814 |
| # - runner: some-cuda-available-runner |
| # pjrt_platform: cuda |
| # TODO: enable these AMD runners |
| # - runner: nodai-amdgpu-w7900-x86-64 |
| # pjrt_platform: rocm |
| # - runner: nodai-amdgpu-w7900-x86-64 |
| # pjrt_platform: vulkan |
| name: Build and test |
| runs-on: ${{ matrix.runner }} |
| env: |
| PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages |
| VENV_DIR: ${{ github.workspace }}/.venv |
| steps: |
| - name: Checking out repository |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| with: |
| submodules: true |
| - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 |
| with: |
| # Must match the subset of versions built in pkgci_build_packages. |
| python-version: "3.11" |
| - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 |
| with: |
| name: linux_x86_64_release_packages |
| path: ${{ env.PACKAGE_DOWNLOAD_DIR }} |
| - name: Setup base venv |
| run: | |
| ./build_tools/pkgci/setup_venv.py ${VENV_DIR} \ |
| --artifact-path=${PACKAGE_DOWNLOAD_DIR} \ |
| --fetch-gh-workflow=${{ inputs.artifact_run_id }} |
| - name: Build and install |
| run: | |
| # install editable into venv |
| source ${VENV_DIR}/bin/activate |
| python -m pip install -v --no-deps -e integrations/pjrt/python_packages/iree_${{ matrix.pjrt_platform }}_plugin |
| # install |
| python -m pip install jax==0.4.36 |
| - name: Run tests |
| run: | |
| source ${VENV_DIR}/bin/activate |
| build_tools/testing/run_jax_tests.sh ${{ matrix.pjrt_platform }} |