Skip to content

Commit

Permalink
Drop regression_suite install from setup_venv.py. (iree-org#18072)
Browse files Browse the repository at this point in the history
Progress on iree-org#16203.

We only run tests from
https://github.com/iree-org/iree/tree/main/experimental/regression_suite
in a few jobs, but other jobs are sharing this
`build_tools/pkgci/setup_venv.py` script, so this moves the extra
install closer to where it is needed.

Also drop the seemingly unused `IREERS_ARTIFACT_DIR` environment
variable that got copy/pasted around.
  • Loading branch information
ScottTodd authored Aug 1, 2024
1 parent 2d70891 commit 242d69e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 33 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pkgci_regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pkgci_test_tensorflow_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pkgci_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 0 additions & 26 deletions build_tools/pkgci/setup_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import functools
from glob import glob
import json
import os
import sys
from pathlib import Path
import platform
Expand Down Expand Up @@ -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 [
Expand Down Expand Up @@ -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


Expand Down
9 changes: 6 additions & 3 deletions experimental/regression_suite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=<<RUN_ID>> \
--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, `<<RUN_ID>>` is the value in any GitHub action presubmit/postsubmit
Expand Down
1 change: 1 addition & 0 deletions integrations/tensorflow/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
tensorflow>=2.16.1
keras>=2.7.0
Pillow>=9.2.0
pytest

0 comments on commit 242d69e

Please sign in to comment.