Skip to content

Commit

Permalink
[OV] Speedup precommit tests (#2650)
Browse files Browse the repository at this point in the history
### Changes

Use `ubuntu-20.04-8-cores` runner 
Run tests in parallel by xdist (12 vs 37 mins)
Add summary `-ra` to show list of not passed tests (skip, xfail, fail)
  • Loading branch information
AlexanderDokuchaev authored Apr 24, 2024
1 parent 590bc6d commit 9c7a212
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
name: coverage_onnx
flags: ONNX
openvino:
runs-on: ubuntu-20.04
runs-on: ubuntu-20.04-8-cores
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ install-openvino-dev: install-openvino-test install-pre-commit
pip install -r examples/post_training_quantization/openvino/yolov8_quantize_with_accuracy_control/requirements.txt

test-openvino:
ONEDNN_MAX_CPU_ISA=AVX2 pytest ${COVERAGE_ARGS} tests/openvino $(DATA_ARG) --junitxml ${JUNITXML_PATH}
ONEDNN_MAX_CPU_ISA=AVX2 pytest ${COVERAGE_ARGS} -n4 -ra tests/openvino $(DATA_ARG) --junitxml ${JUNITXML_PATH}

test-install-openvino:
pytest tests/cross_fw/install -s \
Expand Down
3 changes: 2 additions & 1 deletion tests/openvino/native/test_model_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ class InplaceOpTestCase:
dims: str = "DEFAULT"

def __str__(self) -> str:
return str(self.__dict__.values())
s = f"{self.name}-{self.reduce_shape}-{self.op_builder.__name__}-{self.ref_types}-{self.ref_values}-{self.dims}"
return s.replace(" ", "")


LINEAR_MODEL_SHAPES = {
Expand Down
1 change: 1 addition & 0 deletions tests/openvino/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pytest==8.0.2
pytest-xdist==3.5.0
virtualenv
pytest-cov
pytest-mock>=3.3.1
Expand Down

0 comments on commit 9c7a212

Please sign in to comment.