Skip to content

Commit

Permalink
Merge branch 'master' into an/fix_f16_norm_l2
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes authored Oct 16, 2023
2 parents 2f06044 + 475ddb9 commit 333cf42
Show file tree
Hide file tree
Showing 112 changed files with 1,380 additions and 1,000 deletions.
53 changes: 16 additions & 37 deletions .ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,44 +66,23 @@ jobs:
INSTALL_DIR: $(WORK_DIR)\install_pkg
INSTALL_TEST_DIR: $(INSTALL_DIR)\tests
SETUPVARS: $(INSTALL_DIR)\setupvars.bat
PYTHON_DIR: C:\hostedtoolcache\windows\Python\3.11.2\x64
CMAKE_VERSION: 3.24.0
CMAKE_CMD: $(WORK_DIR)\cmake-$(CMAKE_VERSION)-windows-x86_64\cmake-$(CMAKE_VERSION)-windows-x86_64\bin\cmake.exe
OV_CMAKE_TOOLCHAIN_FILE: $(REPO_DIR)\cmake\toolchains\mt.runtime.win32.toolchain.cmake
PYTHON_VENV_DIR: $(WORK_DIR)\.venv

PYTHON_EXE: C:\hostedtoolcache\windows\Python\3.8.2\x64\python.exe

steps:
- script: |
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
rd /Q /S $(WORK_DIR) & mkdir C:\hostedtoolcache\windows\Python\3.11.2
rd /Q /S $(BUILD_DIR) & mkdir C:\hostedtoolcache\windows\Python\3.11.2\x64
rd /Q /S $(BUILD_SAMPLES_DIR) & mkdir $(BUILD_SAMPLES_DIR)
rd /Q /S $(BUILD_SAMPLES_TESTS_DIR) & mkdir $(BUILD_SAMPLES_TESTS_DIR)
displayName: 'Make dir'
- script: curl -O https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe
displayName: 'Download Python'
workingDirectory: $(WORK_DIR)

- script: |
python-3.11.2-amd64.exe /passive InstallAllUsers=0 Include_launcher=0 TargetDir=C:\hostedtoolcache\windows\Python\3.11.2\x64 && ^
cp C:\hostedtoolcache\windows\Python\3.8.2\x64.complete C:\hostedtoolcache\windows\Python\3.11.2\x64.complete
displayName: 'Install Python'
workingDirectory: $(WORK_DIR)
- task: UsePythonVersion@0
displayName: 'Use Python'
inputs:
versionSpec: '3.11.2'
disableDownloadFromRegistry: true

- script: |
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
tree C:\hostedtoolcache\windows\Python
where python
python --version
where $(PYTHON_EXE)
$(PYTHON_EXE) --version
where java
java -version
wmic computersystem get TotalPhysicalMemory
Expand All @@ -124,20 +103,20 @@ jobs:
path: openvino_contrib

- script: |
python -m pip install --upgrade pip
$(PYTHON_EXE) -m pip install --upgrade pip
rem For running Python API tests
python -m pip install -r $(REPO_DIR)\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
python -m pip install -r $(REPO_DIR)\src\bindings\python\wheel\requirements-dev.txt
python -m pip install -r $(REPO_DIR)\src\bindings\python\requirements.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\bindings\python\src\compatibility\openvino\requirements-dev.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\bindings\python\wheel\requirements-dev.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\bindings\python\requirements.txt
rem For running Paddle frontend unit tests
python -m pip install -r $(REPO_DIR)\src\frontends\paddle\tests\requirements.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\frontends\paddle\tests\requirements.txt
rem For running ONNX frontend unit tests
python -m pip install -r $(REPO_DIR)\src\frontends\onnx\tests\requirements.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\frontends\onnx\tests\requirements.txt
rem For running TensorFlow frontend unit tests
python -m pip install -r $(REPO_DIR)\src\frontends\tensorflow\tests\requirements.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\src\frontends\tensorflow\tests\requirements.txt
rem For MO unit tests
python -m pip install -r $(REPO_DIR)\tools\mo\requirements.txt
python -m pip install -r $(REPO_DIR)\tools\mo\requirements_dev.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\tools\mo\requirements.txt
$(PYTHON_EXE) -m pip install -r $(REPO_DIR)\tools\mo\requirements_dev.txt
rem Speed up build
powershell -command "Invoke-WebRequest https://github.com/Kitware/CMake/releases/download/v$(CMAKE_VERSION)/cmake-$(CMAKE_VERSION)-windows-x86_64.zip -OutFile cmake-$(CMAKE_VERSION)-windows-x86_64.zip"
powershell -command "Expand-Archive -Force cmake-$(CMAKE_VERSION)-windows-x86_64.zip"
Expand All @@ -162,10 +141,10 @@ jobs:
-DENABLE_TESTS=ON ^
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON ^
-DENABLE_STRICT_DEPENDENCIES=OFF ^
-DPython3_EXECUTABLE=$(PYTHON_EXE) ^
-DENABLE_PYTHON=ON ^
-DBUILD_nvidia_plugin=OFF ^
-DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" ^
-DPython3_EXECUTABLE="C:\hostedtoolcache\windows\Python\3.11.2\x64\python.exe" ^
-DOPENVINO_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules ^
-DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
-DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" ^
Expand All @@ -190,7 +169,7 @@ jobs:
- script: dir $(INSTALL_DIR) /s
displayName: 'List install files'

- script: python -m pip install openvino-dev --find-links=$(INSTALL_DIR)\tools
- script: $(PYTHON_EXE) -m pip install openvino-dev --find-links=$(INSTALL_DIR)\tools
displayName: 'Install Wheels'

- script: |
Expand All @@ -215,12 +194,12 @@ jobs:
if not exist %USERPROFILE%\Documents\Intel\OpenVINO\openvino_c_samples_build\ exit 1
displayName: 'Build c samples'
- script: python -m pip install -r $(INSTALL_TEST_DIR)\smoke_tests\requirements.txt
- script: $(PYTHON_EXE) -m pip install -r $(INSTALL_TEST_DIR)\smoke_tests\requirements.txt
displayName: 'Install dependencies for samples smoke tests'

- script: |
call $(SETUPVARS) && ^
python -m pytest $(INSTALL_DIR)\tests\smoke_tests\ --env_conf $(INSTALL_TEST_DIR)\smoke_tests\env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml
$(PYTHON_EXE) -m pytest $(INSTALL_DIR)\tests\smoke_tests\ --env_conf $(INSTALL_TEST_DIR)\smoke_tests\env_config.yml -s --junitxml=$(INSTALL_TEST_DIR)/TEST-SamplesSmokeTests.xml
env:
IE_APP_PATH: $(INSTALL_DIR)\samples_bin
IE_APP_PYTHON_PATH: $(INSTALL_DIR)\samples\python\
Expand Down
9 changes: 0 additions & 9 deletions .ci/azure/windows_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ jobs:
SETUPVARS: $(INSTALL_DIR)\setupvars.bat

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.11.2'
addToPath: true
architecture: 'x64'
githubToken: $(auth_token)
displayName: Setup Python 3.11
name: setupPython

- script: |
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
where python
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests on Linux (Ubuntu 20.04, Python 3.11)
name: Linux (Ubuntu 20.04, Python 3.11)
on:
schedule:
# at 00:00 on Wednesday and Saturday
Expand Down Expand Up @@ -947,6 +947,16 @@ jobs:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: ONNX Layer Tests
run: |
python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt
# requires 'unit_tests' from 'tools/mo'
export PYTHONPATH=${OPENVINO_REPO}/tools/mo/:$PYTHONPATH
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${INSTALL_TEST_DIR}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: TensorFlow 1 Layer Tests - TF FE
run: |
python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt
Expand Down Expand Up @@ -1126,13 +1136,14 @@ jobs:
with:
name: test-results-functional-cpu
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.xml
${{ env.INSTALL_TEST_DIR }}/temp/*.log
${{ env.INSTALL_TEST_DIR }}/logs/*.log
${{ env.INSTALL_TEST_DIR }}/logs/failed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/crashed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/hanged/*.log
${{ env.INSTALL_TEST_DIR }}/logs/interapted/*.log
${{ env.INSTALL_TEST_DIR }}/logs/disabled_tests.log
${{ env.INSTALL_TEST_DIR }}/logs/hash_table.csv
${{ env.PARALLEL_TEST_CACHE }}
if-no-files-found: 'error'

TensorFlow_Hub_Models_Tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linux_conditional_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ jobs:
# For running Paddle frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt
# see https://github.com/PaddlePaddle/Paddle/issues/55597#issuecomment-1718131420
wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb
apt-get install ./libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb
#
# Build
Expand Down
78 changes: 72 additions & 6 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ jobs:
${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowLiteFrontend.xml
- name: Transformations Tests
- name: Transformations func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_transformations_tests --gtest_print_time=1 \
Expand All @@ -372,6 +372,12 @@ jobs:
${{ env.INSTALL_TEST_DIR }}/ov_util_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-commonUtilsTests.xml
- name: Snippets func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_snippets_func_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SnippetsFuncTests.xml
- name: CPU plugin unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
Expand All @@ -384,7 +390,13 @@ jobs:
${{ env.INSTALL_TEST_DIR }}/ov_auto_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_unit_tests.xml
- name: Template plugin tests
- name: AUTO func Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_func_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_func_tests.xml
- name: Template plugin func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_template_func_tests --gtest_print_time=1 \
Expand All @@ -403,11 +415,31 @@ jobs:
${{ env.INSTALL_TEST_DIR }}/ov_capi_test --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OpenVINOCAPITests.xml
- name: AutoBatch unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_unit_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_unit_tests.xml
- name: AutoBatch func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml
- name: Proxy Plugin func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml
- name: Hetero unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroUnitTests.xml
- name: Hetero func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
Expand Down Expand Up @@ -485,7 +517,7 @@ jobs:
python3 -m pip install $ov_dev_wheel_name[mxnet,caffe,kaldi,onnx,tensorflow2,pytorch]
popd
- name: nGraph and IE Python Bindings Tests
- name: Python API 1.0 Tests
run: |
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/pyngraph \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \
Expand All @@ -501,9 +533,7 @@ jobs:
python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/pyopenvino \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_onnx/test_zoo_models.py \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_onnx/test_backend.py
--ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py
- name: MO Python API Tests
run: |
Expand All @@ -517,10 +547,22 @@ jobs:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: OVC Python API Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
# TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '<package>/python/openvino'
source ${{ env.INSTALL_DIR }}/setupvars.sh
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: Model Optimizer unit tests
run: |
export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:$PYTHONPATH
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests \
--ignore=${{ env.INSTALL_TEST_DIR }}/mo/unit_tests/mo/front/mxnet \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml
- name: PyTorch Layer Tests
Expand All @@ -533,6 +575,17 @@ jobs:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: ONNX Layer Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: TensorFlow 1 Layer Tests - TF FE
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
Expand Down Expand Up @@ -568,6 +621,7 @@ jobs:
--ir_version=11 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_Activation.xml -k "sigmoid"
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: TensorFlow Lite Layer Tests - TFL FE
run: |
Expand All @@ -577,6 +631,14 @@ jobs:
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_lite_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tfl_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16

- name: Python ONNX operators tests
run: |
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time - ONNX Model Zoo tests are run separately
python3 -m pytest -sv ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests -k 'not cuda' \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-onnx_frontend.xml \
--ignore=${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/test_python/test_zoo_models.py
- name: Python Frontend tests
run: |
Expand All @@ -587,6 +649,10 @@ jobs:
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/py_frontend_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_py_fontend.xml
# TODO: install to 'tests' component via cpack
- name: OVC unit tests
run: python3 -m pytest -s ${{ env.OPENVINO_REPO }}/tools/ovc/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-OpenVinoConversion.xml

- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
Expand Down
Loading

0 comments on commit 333cf42

Please sign in to comment.