Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into itikhono/refactor…
Browse files Browse the repository at this point in the history
…ing/pass_manager
  • Loading branch information
itikhono committed Jul 23, 2024
2 parents cc854e9 + bb7f0e7 commit 6740084
Show file tree
Hide file tree
Showing 55 changed files with 1,161 additions and 237 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/job_openvino_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_JS_DIR: ${{ github.workspace }}/openvino/src/bindings/js
OPENVINO_JS_LIBS_DIR: ${{ github.workspace }}/openvino/src/bindings/js/node/bin
NODE_VERSION: 20
NODE_VERSION: 21
DISPLAY: ':99'
steps:
- name: Fetch OpenVINO JS sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down Expand Up @@ -61,3 +62,13 @@ jobs:
- name: Test OpenVINO JS API
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: npm run test

- name: Install electron deps and run Xvfb
if: runner.os == 'Linux'
run: |
apt-get update && apt-get install -y xvfb libgtk-3-0 libgbm1
Xvfb "$DISPLAY" &
- name: E2E of openvino-node package
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: npm run test:e2e
38 changes: 22 additions & 16 deletions .github/workflows/job_pytorch_models_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:
type: string
required: false
default: '{"image": null}'
event:
description: 'Event that triggered the workflow. E.g., "schedule" for nightly runs'
model_scope:
description: 'Scope of models for testing.'
type: string
required: true

Expand All @@ -22,7 +22,7 @@ permissions: read-all
jobs:
PyTorch_Models_Tests:
name: PyTorch Models tests
timeout-minutes: ${{ inputs.event == 'schedule' && 400 || 30 }}
timeout-minutes: ${{ inputs.model_scope == 'precommit' && 30 || 400 }}
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
Expand Down Expand Up @@ -113,7 +113,15 @@ jobs:
python3 -m pip install ${INSTALL_DIR}/tools/openvino-*
python3 -m pip install ${INSTALL_DIR}/openvino_tokenizers-*
- name: Install PyTorch tests requirements
- name: Install PyTorch tests requirements for precommit
if: ${{ inputs.model_scope == 'precommit' }}
run: |
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/requirements.txt
env:
CPLUS_INCLUDE_PATH: ${{ env.Python_ROOT_DIR }}/include/python${{ env.PYTHON_VERSION }}

- name: Install PyTorch tests requirements for nightly
if: ${{ inputs.model_scope != 'precommit' }}
run: |
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/requirements.txt
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/requirements_secondary.txt
Expand All @@ -123,48 +131,46 @@ jobs:
CPLUS_INCLUDE_PATH: ${{ env.Python_ROOT_DIR }}/include/python${{ env.PYTHON_VERSION }}

- name: PyTorch Models Tests Timm and Torchvision
if: ${{ inputs.model_scope == 'precommit' || inputs.model_scope == 'nightly_scope1' }}
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_model_timm_tv_tests.html --self-contained-html -v -n 4 -k "TestTimmConvertModel or TestTorchHubConvertModel"
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TYPE: ${{ inputs.model_scope == 'precommit' && 'precommit' || 'nightly' }}
TEST_DEVICE: CPU
OP_REPORT_FILE: ${{ env.INSTALL_TEST_DIR }}/TEST-torch_unsupported_ops.log

- name: PyTorch Models Tests Not Timm or Torchvision
if: always()
if: ${{ inputs.model_scope == 'precommit' || inputs.model_scope == 'nightly_scope2' }}
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_model_tests.html --self-contained-html -v -k "not (TestTimmConvertModel or TestTorchHubConvertModel or test_pa_precommit)"
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_model_tests.html --self-contained-html -v -k "not (TestTimmConvertModel or TestTorchHubConvertModel)"
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TYPE: ${{ inputs.model_scope == 'precommit' && 'precommit' || 'nightly' }}
TEST_DEVICE: CPU
USE_SYSTEM_CACHE: False
OP_REPORT_FILE: ${{ env.INSTALL_TEST_DIR }}/TEST-torch_unsupported_ops.log

- name: PagedAttention Test
if: always()
if: ${{ inputs.model_scope == 'precommit' }}
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/test_pa_transformation.py -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_pagedattention_tests.html --self-contained-html -v --tb=short -n 4
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/transformation_tests/test_pa_transformation.py -m precommit --html=${INSTALL_TEST_DIR}/TEST-torch_pagedattention_tests.html --self-contained-html -v --tb=short -n 4
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU
USE_SYSTEM_CACHE: False
OP_REPORT_FILE: ${{ env.INSTALL_TEST_DIR }}/TEST-torch_unsupported_ops.log

- name: StatefulToStateless Test
if: always()
if: ${{ inputs.model_scope == 'precommit' }}
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/test_stateful_to_stateless_transformation.py -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_stateful_to_stateless_tests.html --self-contained-html -v --tb=short
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/transformation_tests/test_stateful_to_stateless_transformation.py -m precommit --html=${INSTALL_TEST_DIR}/TEST-torch_stateful_to_stateless_tests.html --self-contained-html -v --tb=short
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU
USE_SYSTEM_CACHE: False

- name: Reformat unsupported ops file
if: '!cancelled()'
if: ${{ inputs.model_scope != 'precommit' && !cancelled()}}
run: |
python3 ${MODEL_HUB_TESTS_INSTALL_DIR}/pytorch/scripts/process_op_report.py ${INSTALL_TEST_DIR}/TEST-torch_unsupported_ops.log
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,26 @@ jobs:
needs: [ Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
runner: ${{ github.event_name == 'schedule' && 'ubuntu-20.04-16-cores' || 'ubuntu-20.04-8-cores' }}
event: ${{ github.event_name }}
runner: 'ubuntu-20.04-8-cores'
model_scope: 'precommit'

PyTorch_Models_Tests_Nightly_Scope1:
name: PyTorch Models Nightly Scope1 tests
if: ${{ github.event_name == 'schedule' }}
needs: [ Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
runner: 'ubuntu-20.04-16-cores'
model_scope: 'nightly_scope1'

PyTorch_Models_Tests_Nightly_Scope2:
name: PyTorch Models Nightly Scope2 tests
if: ${{ github.event_name == 'schedule' }}
needs: [ Build, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
runner: 'ubuntu-20.04-16-cores'
model_scope: 'nightly_scope2'

NVIDIA_Plugin:
name: NVIDIA plugin
Expand Down Expand Up @@ -687,7 +705,7 @@ jobs:
Overall_Status:
name: ci/gha_overall_status
needs: [Smart_CI, Build, Debian_Packages, Samples, Conformance, ONNX_Runtime, CXX_Unit_Tests, Python_Unit_Tests, TensorFlow_Layer_Tests,
CPU_Functional_Tests, TensorFlow_Models_Tests_Precommit, PyTorch_Models_Tests, NVIDIA_Plugin, Openvino_tokenizers]
CPU_Functional_Tests, TensorFlow_Models_Tests_Precommit, PyTorch_Models_Tests, NVIDIA_Plugin, Openvino_tokenizers, iGPU]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ jobs:
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "${{ fromJSON(needs.docker.outputs.images).ov_test.ubuntu_20_04_arm64 }}"}'
event: ${{ github.event_name }}
model_scope: 'precommit'

Overall_Status:
name: ci/gha_overall_status_linux_arm64
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ jobs:
env:
OPENVINO_JS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js"
OPENVINO_JS_LIBS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js\\node\\bin"
NODE_VERSION: 21
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API

steps:
Expand All @@ -355,24 +356,36 @@ jobs:
name: openvino_js_package
path: ${{ env.OPENVINO_JS_LIBS_DIR }}

- name: Setup Node
- name: Setup Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
node-version: ${{ env.NODE_VERSION }}

- name: Configure OpenVINO JS
- name: Configure OpenVINO JS API
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: npm i

- name: Test OpenVINO JS
- name: Test OpenVINO JS API
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: npm test

- name: Test OpenVINO JS (cmd)
- name: Test OpenVINO JS API (cmd)
shell: cmd
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: call npm test

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: E2E of openvino-node package
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: npm run test:e2e

- name: E2E of openvino-node package (cmd)
shell: cmd
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
run: call npm run test:e2e

- name: Create package dir
working-directory: ${{ env.OPENVINO_JS_DIR }}
run: mkdir project-uses-openvino-node
Expand Down
2 changes: 1 addition & 1 deletion samples/js/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"lint": "eslint ."
},
"engines": {
"node": ">=20.5.1"
"node": ">=21.0.0"
}
}
Loading

0 comments on commit 6740084

Please sign in to comment.