Build OpenVINO and Test Optimum #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build OpenVINO from source and test optimum-intel[openvino] | |
name: Build OpenVINO and Test Optimum | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/test_openvino_build.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/test_openvino_build.yml' | |
schedule: | |
- cron: '14 3 * * *' # run every day at 3:14 | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: 'huggingface/optimum-intel' | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: lscpu | |
run: lscpu | |
- name: Clone Openvino | |
run: | | |
git clone https://github.com/openvinotoolkit/openvino.git | |
- name : Init OpenVINO | |
run: | | |
git submodule update --init --recursive && mkdir build | |
working-directory: ./openvino | |
- run: | | |
git log | head -n 100 | |
working-directory: ./openvino | |
- name: Build OpenVINO | |
run: | | |
pip install -r ../src/bindings/python/wheel/requirements-dev.txt | |
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_INTEL_GPU=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_OPENCV=OFF -DENABLE_OV_ONNX_FRONTEND=ON -DENABLE_DOCS=OFF -DENABLE_SAMPLES=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_TF_LITE_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF -DENABLE_OV_PYTORCH_FRONTEND=ON -DENABLE_FASTER_BUILD=ON .. && make --jobs=$(nproc --all) | |
working-directory: ./openvino/build | |
- name: Install OpenVINO wheels | |
run: | | |
pip install openvino*whl | |
working-directory: ./openvino/build/wheels | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install .[openvino,nncf,tests] | |
- name: OpenVINO version | |
run: | |
python -c "from openvino.runtime import get_version;print(get_version())" | |
- name: Pip freeze | |
run: | |
pip freeze | |
- name: Test Basic | |
if: success() || failure() | |
run: | | |
pytest tests/openvino/test_modeling_basic.py | |
- name: Test Modeling | |
if: success() || failure() | |
run: | | |
pytest tests/openvino/test_modeling.py | |
- name: Test Quantization | |
if: success() || failure() | |
run: | | |
pytest tests/openvino/test_quantization.py | |
- name: Test Training | |
if: success() || failure() | |
run: | | |
pytest tests/openvino/test_training.py | |
- name: Test Training Examples | |
if: success() || failure() | |
run: | | |
pytest tests/openvino/test_training_examples.py | |