Skip to content

Commit

Permalink
update openvino
Browse files Browse the repository at this point in the history
  • Loading branch information
Wovchena committed May 27, 2024
1 parent 72a041c commit 6116bd1
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 48 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/genai_python_lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on: pull_request
jobs:
ubuntu_genai_python_lib:
runs-on: ubuntu-22.04
env:
# A tokenizer's dependency fails to compile with Ninja in CenOS7 env
CMAKE_GENERATOR: Unix Makefiles
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -17,10 +20,9 @@ jobs:
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release -j
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts.
# Use Unix Makefiles because the defaut Ninja fails for CentOS7.
- run: source ./ov/setupvars.sh && CMAKE_GENERATOR="Unix Makefiles" python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- run: PYTHONPATH=./src/python/ python -c "from openvino_genai import LLMPipeline"
- run: source ./ov/setupvars.sh && CMAKE_BUILD_PARALLEL_LEVEL="" CMAKE_GENERATOR="Unix Makefiles" python -m pip install .
- run: source ./ov/setupvars.sh && CMAKE_BUILD_PARALLEL_LEVEL="" python -m pip install .
- run: python -c "from openvino_genai import LLMPipeline"
- name: GenAI Python API tests
run: |
Expand Down Expand Up @@ -51,7 +53,7 @@ jobs:
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && cmake --build ./build/ --config Release -j
# GitHub Actions already provides what is listed in ./requirements-build.txt but the internal
# build system doesn't. Install ./requirements-build.txt to detect possible conflicts.
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --pre --extra-index-url https://storage.openvinotoolkit.org/
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- run: set "PYTHONPATH=./src/python;" && call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -c "from openvino_genai import LLMPipeline" # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that.
- run: set CMAKE_BUILD_PARALLEL_LEVEL=&& call w_openvino_toolkit_windows_2024.2.0.dev20240515_x86_64\setupvars.bat && python -m pip install .
- run: python -c "from openvino_genai import LLMPipeline"
4 changes: 2 additions & 2 deletions .github/workflows/lcm_dreamshaper_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
conda activate openvino_lcm_cpp
conda update -c conda-forge --all
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513c-compiler cxx-compiler git make cmake
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- name: Install python dependencies
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
run: |
conda activate openvino_lcm_cpp
conda update -c conda-forge --all
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513c-compiler cxx-compiler git make cmake
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- name: Install python dependencies
Expand Down
84 changes: 42 additions & 42 deletions .github/workflows/stable_diffusion_1_5_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install OpenVINO and other conda dependencies
run: |
conda activate openvino_sd_cpp
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513c-compiler cxx-compiler git make cmake
conda env config vars set LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
- name: Install python dependencies
Expand Down Expand Up @@ -67,44 +67,44 @@ jobs:
run: ./build/stable_diffusion -m ./models/stable_diffusion_v1_5_ov -t FP16

stable_diffusion_1_5_cpp-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: openvino_sd_cpp
python-version: "3.10"

- name: Install OpenVINO and other conda dependencies
run: |
conda activate openvino_sd_cpp
conda install -c conda-forge openvino=2024.1.0 c-compiler cxx-compiler git make cmake
- name: Install python dependencies
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
python -m pip install -r requirements.txt
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Download and convert model and tokenizer
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
optimum-cli export openvino --model runwayml/stable-diffusion-v1-5 --task stable-diffusion --weight-format fp16 models/stable_diffusion_v1_5_ov/FP16
- name: Build app
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release --parallel
- name: Run app
working-directory: ${{ env.working_directory }}
run: '& "./build/Release/stable_diffusion.exe" -m ./models/stable_diffusion_v1_5_ov -t FP16 --dynamic'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: openvino_sd_cpp
python-version: "3.10"

- name: Install OpenVINO and other conda dependencies
run: |
conda activate openvino_sd_cpp
conda install -c conda-forge -c conda-forge/label/openvino_dev openvino==2024.2.0.dev20240513c-compiler cxx-compiler git make cmake
- name: Install python dependencies
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
python -m pip install -r requirements.txt
python -m pip install ../../../thirdparty/openvino_tokenizers/[transformers] --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly
- name: Download and convert model and tokenizer
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
optimum-cli export openvino --model runwayml/stable-diffusion-v1-5 --task stable-diffusion --weight-format fp16 models/stable_diffusion_v1_5_ov/FP16
- name: Build app
working-directory: ${{ env.working_directory }}
run: |
conda activate openvino_sd_cpp
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release --parallel
- name: Run app
working-directory: ${{ env.working_directory }}
run: '& "./build/Release/stable_diffusion.exe" -m ./models/stable_diffusion_v1_5_ov -t FP16 --dynamic'

0 comments on commit 6116bd1

Please sign in to comment.