Skip to content

Build OpenVINO and Test Optimum #153

Build OpenVINO and Test Optimum

Build OpenVINO and Test Optimum #153

# Build OpenVINO from source and test optimum-intel[openvino]
name: Build OpenVINO and Test Optimum
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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.8,]
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/src/compatibility/openvino/requirements-dev.txt
pip install -r ../src/bindings/python/wheel/requirements-dev.txt
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_INTEL_GPU=OFF -DENABLE_OPENCV=OFF -DENABLE_OV_ONNX_FRONTEND=ON -DENABLE_DOCS=OFF -DENABLE_SAMPLES=OFF -DENABLE_INTEL_GNA=OFF -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON -DENABLE_OV_TF_FRONTEND=OFF -DENABLE_OV_PADDLE_FRONTEND=OFF -DENABLE_OV_PYTORCH_FRONTEND=OFF .. && 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
run: |
pytest tests/openvino/test_modeling_basic.py
- name: Test Modeling
run: |
pytest tests/openvino/test_modeling.py
- name: Test Quantization
run: |
pytest tests/openvino/test_quantization.py
- name: Test Training
run: |
pytest tests/openvino/test_training.py
- name: Test Training Examples
run: |
pytest tests/openvino/test_training_examples.py