-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ea/qwen2vl' of https://github.com/eaidova/optimum-intel …
…into ea/qwen2vl
- Loading branch information
Showing
53 changed files
with
2,320 additions
and
1,114 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: OpenVINO - Full Test | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "41 3 * * *" # run every day at 3:41 | ||
push: | ||
branches: | ||
- v*-release | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule') || (github.event_name == 'push') || contains( github.event.pull_request.labels.*.name, 'openvino-test') }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "3.9" | ||
os: "ubuntu-22.04" | ||
transformers-version: "latest" | ||
openvino: "ov-stable" | ||
nncf: "nncf-stable" | ||
- python-version: "3.9" | ||
os: "ubuntu-22.04" | ||
transformers-version: "latest" | ||
openvino: "ov-nightly" | ||
nncf: "nncf-stable" | ||
- python-version: "3.9" | ||
os: "ubuntu-22.04" | ||
transformers-version: "latest" | ||
openvino: "ov-stable" | ||
nncf: "nncf-develop" | ||
- python-version: "3.9" | ||
os: "ubuntu-22.04" | ||
transformers-version: "latest" | ||
openvino: "ov-nightly" | ||
nncf: "nncf-develop" | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
# Install PyTorch CPU to prevent unnecessary downloading/installing of CUDA packages | ||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
pip install .[tests] | ||
- name: Install openvino-nightly | ||
if: ${{ matrix.openvino == 'ov-nightly' }} | ||
run: pip install --pre -U openvino openvino-tokenizers --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly | ||
|
||
- name: Install openvino release | ||
if: ${{ matrix.openvino == 'ov-stable' }} | ||
run: pip install .[openvino] | ||
|
||
- name: Install nncf develop | ||
if: ${{ matrix.nncf == 'nncf-develop' }} | ||
run: pip install git+https://github.com/openvinotoolkit/nncf.git | ||
|
||
- name: Install nncf release | ||
if: ${{ matrix.nncf == 'nncf-stable' }} | ||
run: pip install .[nncf] | ||
|
||
- name: Install the lowest compatible transformers version | ||
if: ${{ matrix.transformers-version != 'latest' }} | ||
run: pip install transformers==${{ matrix.transformers-version }} | ||
|
||
- name: Pip freeze | ||
run: pip freeze | ||
|
||
- name: OpenVINO tests | ||
run: pytest tests/openvino --durations=0 | ||
env: | ||
RUN_SLOW: 1 | ||
HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
ARG PLATFORM=cpu | ||
|
||
FROM ubuntu:22.04 as cpu | ||
WORKDIR /usr/src/ | ||
RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ | ||
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
git \ | ||
curl \ | ||
vim \ | ||
build-essential \ | ||
ccache \ | ||
libgoogle-perftools-dev \ | ||
numactl \ | ||
cmake \ | ||
libjpeg-dev \ | ||
pybind11-dev \ | ||
libpng-dev \ | ||
python3 \ | ||
python3-pip \ | ||
&& rm -rf /var/lib/apt/lists/*" | ||
RUN /usr/sbin/update-ccache-symlinks | ||
RUN mkdir /opt/ccache && ccache --set-config=cache_dir=/opt/ccache | ||
|
||
ARG IPEX_VERSION=2.5.0 | ||
ARG PYTORCH_VERSION=2.5.1 | ||
ARG TORCHVISION_VERSION=0.20.1+cpu | ||
ARG TORCHAUDIO_VERSION=2.5.1+cpu | ||
|
||
RUN python3 -m pip install --no-cache-dir \ | ||
torch==${PYTORCH_VERSION}+cpu \ | ||
torchvision==${TORCHVISION_VERSION} \ | ||
torchaudio==${TORCHAUDIO_VERSION} \ | ||
--index-url https://download.pytorch.org/whl/cpu && \ | ||
python3 -m pip install intel-openmp -f https://download.pytorch.org/whl/torch_stable.html && \ | ||
python3 -m pip install intel-extension-for-pytorch==$IPEX_VERSION && \ | ||
python3 -m pip install oneccl_bind_pt --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/cpu/cn/ && \ | ||
python3 -m pip install --no-cache-dir py-libnuma | ||
|
||
ARG KMP_BLOCKTIME=1 | ||
ENV KMP_BLOCKTIME=${KMP_BLOCKTIME} | ||
ARG KMP_HW_SUBSET=1T | ||
ENV KMP_HW_SUBSET=${KMP_HW_SUBSET} | ||
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libtcmalloc.so" | ||
|
||
FROM intel/intel-extension-for-pytorch:2.3.110-xpu as xpu | ||
WORKDIR /usr/src/ | ||
|
||
RUN --mount=type=cache,id=apt-dev,target=/var/cache/apt \ | ||
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
ca-certificates \ | ||
git \ | ||
curl \ | ||
vim \ | ||
ccache \ | ||
libgoogle-perftools-dev \ | ||
numactl \ | ||
libjpeg-dev \ | ||
pybind11-dev \ | ||
libpng-dev \ | ||
&& rm -rf /var/lib/apt/lists/*" | ||
RUN wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --dearmor | tee /usr/share/keyrings/intel-graphics.gpg > /dev/null | ||
|
||
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ | ||
| gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null && echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt install -y intel-basekit xpu-smi cmake ninja-build pciutils | ||
|
||
FROM ${PLATFORM} | ||
|
||
COPY optimum optimum | ||
COPY Makefile setup.cfg setup.py pyproject.toml README.md ./ | ||
RUN pip install . |
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.