diff --git a/.github/workflows/pkgci_regression_test.yml b/.github/workflows/pkgci_regression_test.yml index e21c44754a54..40637215faea 100644 --- a/.github/workflows/pkgci_regression_test.yml +++ b/.github/workflows/pkgci_regression_test.yml @@ -62,7 +62,6 @@ jobs: - os-family=Linux env: PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages - IREERS_ARTIFACT_DIR: ${{ github.workspace }}/artifacts CONFIG_FILE_PATH: build_tools/pkgci/external_test_suite/${{ matrix.config-file }} NUMPROCESSES: ${{ matrix.numprocesses }} LOG_FILE_PATH: /tmp/iree_tests_onnx_${{ matrix.name }}_logs.json @@ -166,7 +165,6 @@ jobs: # (note: would need to plumb the presubmit/postsubmit runner-group through to here too) env: PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages - IREERS_ARTIFACT_DIR: ${{ github.workspace }}/artifacts IREE_TEST_FILES: ${{ matrix.iree-tests-cache }} IREE_TEST_PATH_EXTENSION: ${{ github.workspace }}/build_tools/pkgci/external_test_suite MODELS_CONFIG_FILE_PATH: build_tools/pkgci/external_test_suite/${{ matrix.models-config-file }} @@ -263,7 +261,6 @@ jobs: runs-on: nodai-amdgpu-mi300-x86-64 env: PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages - IREERS_ARTIFACT_DIR: ${{ github.workspace }}/artifacts IREE_TEST_FILES: ${{ matrix.iree-tests-cache }} IREE_TEST_PATH_EXTENSION: ${{ github.workspace }}/build_tools/pkgci/external_test_suite VENV_DIR: ${{ github.workspace }}/venv @@ -292,6 +289,8 @@ jobs: ./build_tools/pkgci/setup_venv.py ${VENV_DIR} \ --artifact-path=${PACKAGE_DOWNLOAD_DIR} \ --fetch-gh-workflow=${{ inputs.artifact_run_id }} + source ${VENV_DIR}/bin/activate + pip install -e experimental/regression_suite # TODO(#17344): regenerate .mlirbc files, test plat_rdna3_rocm on rocm # # In-tree tests diff --git a/.github/workflows/pkgci_test_tensorflow_cpu.yml b/.github/workflows/pkgci_test_tensorflow_cpu.yml index 09cfea6ec5c1..221274a9b02d 100644 --- a/.github/workflows/pkgci_test_tensorflow_cpu.yml +++ b/.github/workflows/pkgci_test_tensorflow_cpu.yml @@ -23,7 +23,6 @@ jobs: runs-on: ubuntu-20.04 env: PACKAGE_DOWNLOAD_DIR: ${{ github.workspace }}/.packages - IREERS_ARTIFACT_DIR: ${{ github.workspace }}/artifacts VENV_DIR: ${{ github.workspace }}/.venv IREE_VMVX_DISABLE: 0 steps: diff --git a/.github/workflows/pkgci_unit_test.yml b/.github/workflows/pkgci_unit_test.yml index 138043a666ef..27ed919add08 100644 --- a/.github/workflows/pkgci_unit_test.yml +++ b/.github/workflows/pkgci_unit_test.yml @@ -42,6 +42,8 @@ jobs: ./build_tools/pkgci/setup_venv.py ${VENV_DIR} \ --artifact-path=${PACKAGE_DOWNLOAD_DIR} \ --fetch-gh-workflow=${{ inputs.artifact_run_id }} + source ${VENV_DIR}/bin/activate + pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt - name: Validate runtime wheel run: | source ${VENV_DIR}/bin/activate diff --git a/build_tools/pkgci/setup_venv.py b/build_tools/pkgci/setup_venv.py index 362627a5173c..618bb373fa4e 100755 --- a/build_tools/pkgci/setup_venv.py +++ b/build_tools/pkgci/setup_venv.py @@ -26,7 +26,6 @@ import functools from glob import glob import json -import os import sys from pathlib import Path import platform @@ -118,16 +117,6 @@ def main(args): args.artifact_path = td return main(args) - # Find the regression suite project. - rs_dir = ( - (Path(__file__).resolve().parent.parent.parent) - / "experimental" - / "regression_suite" - ) - if not rs_dir.exists(): - print(f"Could not find regression_suite project: {rs_dir}") - return 1 - artifact_prefix = f"{platform.system().lower()}_{platform.machine()}" wheels = [] for package_stem, variant in [ @@ -169,21 +158,6 @@ def main(args): print(f"Running command: {' '.join([str(c) for c in cmd])}") subprocess.check_call(cmd) - # Now install the regression suite project, which will bring in any deps. - cmd = [ - str(python_exe), - "-m", - "pip", - "install", - "--force-reinstall", - "--timeout", - "60", - "-e", - str(rs_dir) + os.sep, - ] - print(f"Running command: {' '.join(cmd)}") - subprocess.check_call(cmd) - return 0 diff --git a/experimental/regression_suite/README.md b/experimental/regression_suite/README.md index 53668b38103d..7665c5aa9918 100644 --- a/experimental/regression_suite/README.md +++ b/experimental/regression_suite/README.md @@ -9,7 +9,7 @@ the normal tool flows of `iree-compile`, `iree-run-module`, If you have IREE tools on your path or have a virtual environment setup: -``` +```bash pip install -e experimental/regression_suite PATH=../iree-build/tools:$PATH \ pytest experimental/regression_suite @@ -39,13 +39,16 @@ case is to run the regression suite from built compilers and tools from a GitHub presubmit or postsubmit run. This can be done in one step by setting up a venv: -``` +```bash deactivate # If have any venv active. python ./build_tools/pkgci/setup_venv.py \ /tmp/iree_gh_venv \ - --fetch-gh-workflow=<> \ + --fetch-gh-workflow=${RUN_ID} \ [--compiler-variant=asserts] [--runtime-variant=asserts] source /tmp/iree_gh_venv/bin/activate + +# Then install the regression suite and run pytest as usual: +pip install -e experimental/regression_suite ``` In the above, `<>` is the value in any GitHub action presubmit/postsubmit diff --git a/integrations/tensorflow/test/requirements.txt b/integrations/tensorflow/test/requirements.txt index 69c8ae3280ca..c7a6fb504fea 100644 --- a/integrations/tensorflow/test/requirements.txt +++ b/integrations/tensorflow/test/requirements.txt @@ -2,3 +2,4 @@ tensorflow>=2.16.1 keras>=2.7.0 Pillow>=9.2.0 +pytest