Skip to content

Commit

Permalink
Merge branch 'master' into disable_spec_tok_in_rt
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-esir committed Sep 25, 2024
2 parents 053f8d5 + e9d4cae commit 1aab664
Show file tree
Hide file tree
Showing 121 changed files with 5,560 additions and 72,131 deletions.
7 changes: 6 additions & 1 deletion .github/label_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ llm_bench:
- changed-files:
- any-glob-to-any-file:
- 'llm_bench/**'
- '.github/workflows/llm_bench-python.yml'
- '.github/workflows/llm_bench-python.yml'

WWB:
- changed-files:
- any-glob-to-any-file:
- 'llm_bench/python/who_what_benchmark/**'
30 changes: 15 additions & 15 deletions .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- run: curl --output ov.zip ${{ env.w_ov_link }}
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -368,7 +368,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -402,7 +402,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -445,7 +445,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -518,7 +518,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -572,7 +572,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -626,7 +626,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -692,7 +692,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.12
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down Expand Up @@ -738,7 +738,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Install OpenVINO
Expand Down Expand Up @@ -786,7 +786,7 @@ jobs:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install OpenVINO
run: |
mkdir ./ov/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: label PRs

on:
pull_request_target:
types: [opened]
types: [opened, edited, synchronize]
paths:
- llm_bench/python/**
- .github/workflows/llm_bench-python.yml
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/lcm_dreamshaper_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ on:
permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions

env:
WORKING_DIRECTORY: "./image_generation/lcm_dreamshaper_v7/cpp/"
PYTHON_VERSION: '3.8'
PYTHON_VERSION: '3.9'
LINUX_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/l_openvino_toolkit_ubuntu20_2024.5.0.dev20240830_x86_64.tgz
WINDOWS_OV_ARCHIVE_URL: https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.5.0-16570-19eb02fe60b/w_openvino_toolkit_windows_2024.5.0.dev20240830_x86_64.zip
OV_INSTALL_DIR: ${{ github.workspace }}/ov
Expand All @@ -40,7 +39,6 @@ jobs:
tar -xzf openvino_package.tar.gz -C ${{ env.OV_INSTALL_DIR }} --strip-components=1
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
Expand All @@ -53,30 +51,27 @@ jobs:
cache: 'pip'

- name: Create virtual environment
working-directory: ${{ env.WORKING_DIRECTORY }}
run: python3 -m venv openvino_lcm_cpp

- name: Install python dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
source openvino_lcm_cpp/bin/activate
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ../../requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ./samples/requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Download and convert model and tokenizer
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Download and convert models and tokenizer
run: |
source openvino_lcm_cpp/bin/activate
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 models/lcm_dreamshaper_v7/FP16
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 --task stable-diffusion --weight-format fp16 models/lcm_dreamshaper_v7/FP16
- name: Run app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
source ${{ env.OV_INSTALL_DIR }}/setupvars.sh
./build/lcm_dreamshaper
./build/samples/cpp/stable_diffusion/stable_diffusion ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
lcm_dreamshaper_v7_cpp-windows:
runs-on: windows-latest
if: ${{ false }} # TODO: fix Windows
defaults:
run:
shell: pwsh
Expand All @@ -95,7 +90,6 @@ jobs:
popd
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
Expand All @@ -108,27 +102,23 @@ jobs:
cache: 'pip'

- name: Create virtual environment
working-directory: ${{ env.WORKING_DIRECTORY }}
run: python -m venv openvino_lcm_cpp

- name: Install python dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ../../requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
python -m pip install -r ./samples/requirements.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Download and convert model and tokenizer
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Download and convert models and tokenizer
run: |
. "./openvino_lcm_cpp/Scripts/Activate.ps1"
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 models/lcm_dreamshaper_v7/FP16
optimum-cli export openvino --model SimianLuo/LCM_Dreamshaper_v7 --task stable-diffusion --weight-format fp16 models/lcm_dreamshaper_v7/FP16
- name: Run app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
. "${{ env.OV_INSTALL_DIR }}/setupvars.ps1"
./build/Release/lcm_dreamshaper.exe -r --dynamic
./build/samples/cpp/stable_diffusion/Release/lcm_dreamshaper.exe ./models/lcm_dreamshaper_v7/FP16 "cyberpunk cityscape like Tokyo New York with tall buildings at dusk golden hour cinematic lighting"
Overall_Status:
name: ci/gha_overall_status_lcm
Expand Down
99 changes: 93 additions & 6 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux (Ubuntu 20.04, Python 3.8)
name: Linux (Ubuntu 20.04, Python 3.9)
on:
workflow_dispatch:
pull_request:
Expand All @@ -14,8 +14,8 @@ concurrency:
cancel-in-progress: true

env:
PYTHON_VERSION: '3.8'
OV_BRANCH: 'master'
PYTHON_VERSION: '3.9'
OV_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref || github.ref }}
OV_TARBALL: ''

permissions: read-all # Required by https://github.com/ossf/scorecard/blob/e23b8ad91fd6a64a0a971ca4fc0a4d1650725615/docs/checks.md#token-permissions
Expand Down Expand Up @@ -260,15 +260,102 @@ jobs:
run: |
source ${OV_INSTALL_DIR}/setupvars.sh
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./tests/python_tests/requirements.txt --find-links ${OV_INSTALL_DIR}/tools --upgrade-strategy eager
python -m pytest ./tests/python_tests
python -m pytest ./tests/python_tests --ignore ./tests/python_tests/test_whisper_generate_api.py
env:
PYTHONPATH: "./build/:$PYTHONPATH"

- name: Test bindings (wheel)
run: |
source ${OV_INSTALL_DIR}/setupvars.sh
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/tools
python -m pytest ./tests/python_tests
python -m pytest ./tests/python_tests --ignore ./tests/python_tests/test_whisper_generate_api.py
genai_python_lib_whisper:
name: OpenVINO genai extension whisper tests (cmake + wheel)
needs: [ openvino_download, openvino_build ]
if: |
always() &&
(needs.openvino_download.outputs.status == 'success' || needs.openvino_build.result == 'success')
timeout-minutes: 90
defaults:
run:
shell: bash
runs-on: ubuntu-20.04
env:
CMAKE_GENERATOR: Unix Makefiles
CMAKE_BUILD_PARALLEL_LEVEL: null
OV_INSTALL_DIR: ${{ github.workspace }}/ov
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 500Mi
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache

steps:
- name: Clone openvino.genai
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'

- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.OV_INSTALL_DIR }}

- name: Extract OpenVINO packages
run: |
pushd ${OV_INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${OV_INSTALL_DIR} --strip-components=1
popd
- name: Set apt
run: |
echo 'Acquire::Retries "10";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
echo 'APT::Get::Assume-Yes "true";' | sudo tee -a /etc/apt/apt.conf.d/81-assume-yes > /dev/null
echo 'APT::Get::Fix-Broken "true";' | sudo tee -a /etc/apt/apt.conf.d/82-fix-broken > /dev/null
echo 'APT::Get::no-install-recommends "true";' | sudo tee -a /etc/apt/apt.conf.d/83-no-reсommends > /dev/null
- name: Install build dependencies
run: |
sudo ${OV_INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh
sudo apt-get install ccache
- name: Setup ccache
uses: actions/cache@v4
with:
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save-always: ${{ github.ref_name == 'master' && 'true' || 'false' }}
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-${{ runner.arch }}-ccache-genai-release-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-ccache-genai-release
- name: Build genai
run: |
source ${OV_INSTALL_DIR}/setupvars.sh
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
- name: Test bindings
run: |
source ${OV_INSTALL_DIR}/setupvars.sh
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./tests/python_tests/requirements.txt --find-links ${OV_INSTALL_DIR}/tools --upgrade-strategy eager
python -m pytest ./tests/python_tests/test_whisper_generate_api.py
env:
PYTHONPATH: "./build/:$PYTHONPATH"

- name: Test bindings (wheel)
run: |
source ${OV_INSTALL_DIR}/setupvars.sh
python -m pip install . --verbose --find-links ${OV_INSTALL_DIR}/tools
python -m pytest ./tests/python_tests/test_whisper_generate_api.py
genai_package:
name: OpenVINO genai extension (install to OpenVINO package)
Expand Down Expand Up @@ -380,7 +467,7 @@ jobs:
Overall_Status:
name: ci/gha_overall_status_linux
needs: [openvino_download, openvino_build, genai_python_lib, genai_package]
needs: [openvino_download, openvino_build, genai_python_lib, genai_package, genai_python_lib_whisper]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
Expand Down
Loading

0 comments on commit 1aab664

Please sign in to comment.