Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache a model, rename genai target, fix Windows #14

Merged
merged 205 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from 182 commits
Commits
Show all changes
205 commits
Select commit Hold shift + click to select a range
d73346c
Fix noise images generated for '--num' > 1 in Stable Diffusion sample…
yatarkan May 15, 2024
93f7670
update optimum intel commit in llm bench (#444)
eaidova May 16, 2024
cad3abb
Fix an attempt to add a string value to a numerical value (#447)
wgzintel May 16, 2024
d473e96
output no hook data warning when it is text gen model (#449)
wgzintel May 17, 2024
41b07d3
Fix md5 hash for env that does not support usedforsecurity arg (#445)
eaidova May 17, 2024
05a0f36
fix path based configuration (#456)
eaidova May 21, 2024
03e78fe
Revert "Force to generate "inference count" tokens" (#455)
peterchen-intel May 22, 2024
d843229
enable
Wovchena May 22, 2024
2c1d1ef
libtbb-dev
Wovchena May 22, 2024
57ca2d4
move
Wovchena May 22, 2024
37844c9
slash
Wovchena May 22, 2024
5cff21e
install
Wovchena May 22, 2024
561b55a
core_genai_dev
Wovchena May 22, 2024
260d913
remove export
Wovchena May 22, 2024
b6cf954
rreorganaise components
Wovchena May 22, 2024
aaf5c78
add SOVERSION, and requirements-build.txt
Wovchena May 22, 2024
5537d3b
repalce SKBUILD with EXCLUDE_FROM_ALL because the effect is the same
Wovchena May 22, 2024
9966be4
fix NAMELINK_COMPONENT
Wovchena May 22, 2024
2486e53
remove extraline
Wovchena May 22, 2024
7953c0f
Merge branch 'generate_pipeline' into fix-archive
Wovchena May 22, 2024
786eac7
add soft restrictions
Wovchena May 22, 2024
7324da9
Fix build to unblock packaging
Wovchena May 22, 2024
25909cc
verify beam search 1st token optimization (#426)
wgzintel May 23, 2024
e6f05c6
Output median min and avg values to csv (#450)
wgzintel May 23, 2024
5577e84
improve naming
Wovchena May 23, 2024
b679fc7
install samples
Wovchena May 23, 2024
26f9fe1
remove quotes
Wovchena May 23, 2024
1dcd40b
use main target name because an alias can't be specified in cmake --t…
Wovchena May 23, 2024
8c00ccb
define CMAKE_BUILD_PARALLEL_LEVEL
Wovchena May 23, 2024
61fba58
Ensure ./requirements-build.txt won't outdate
Wovchena May 23, 2024
d78fa3b
Use ./requirements-build.txt in python lib build
Wovchena May 23, 2024
757b738
Add missing &&
Wovchena May 23, 2024
51ace23
Test Debug
Wovchena May 23, 2024
e53c525
add matrix for windows_genai_package
Wovchena May 23, 2024
73ac7b1
openvino_tokenizers from form
Wovchena May 23, 2024
e7e50cb
update openvino_tokenizers
Wovchena May 23, 2024
3339407
update openvino_tokenizers
Wovchena May 23, 2024
9b5b915
update openvino_tokenizers
Wovchena May 23, 2024
1fe85b9
revert openvino_tokenizers
Wovchena May 23, 2024
7e23930
tokenizers from fork
Wovchena May 23, 2024
62f5e34
update tokenizers
Wovchena May 23, 2024
63262d7
centos7_2024.2.0.dev
Wovchena May 23, 2024
2d5fc6f
copy target
Wovchena May 23, 2024
6f53005
revert tokenizers
Wovchena May 23, 2024
d8e5bf9
reapply useful changes
Wovchena May 23, 2024
9866f5c
copy so only
Wovchena May 23, 2024
2c691c3
Update tokenizers, centos7_2024.2.0.dev
Wovchena May 23, 2024
3507deb
single thread
Wovchena May 23, 2024
18f8ca8
ubuntu22
Wovchena May 24, 2024
3e914c5
nightyl
Wovchena May 24, 2024
ad49d94
--pre --extra-index-url
Wovchena May 24, 2024
963a520
update tokenizers
Wovchena May 24, 2024
72bede7
space
Wovchena May 24, 2024
e8f4cbe
move --pre --extra-index-url https://storage.openvinotoolkit.org/simp…
Wovchena May 24, 2024
5afd763
release tokenizers
Wovchena May 24, 2024
b47d6d5
merge
Wovchena May 24, 2024
7a28144
downgrade tokenizers
Wovchena May 24, 2024
b7493a1
downgrade
Wovchena May 24, 2024
ee97729
two steps
Wovchena May 24, 2024
0a5d765
downgrade tokenizers
Wovchena May 24, 2024
f4e444f
dont setupvars
Wovchena May 24, 2024
8bcf504
source
Wovchena May 24, 2024
f457faf
fix
Wovchena May 24, 2024
7a2986a
submodule
Wovchena May 24, 2024
25ea88c
releases/2024/2 tokenizers
Wovchena May 25, 2024
2f88d0a
fix-2
Wovchena May 25, 2024
829b40e
rebase
Wovchena May 25, 2024
3a7db44
use make
Wovchena May 25, 2024
b5e5800
comment
Wovchena May 25, 2024
72a041c
CMAKE_GENERATOR=Unix Makefiles
Wovchena May 25, 2024
6116bd1
update openvino
Wovchena May 27, 2024
959f0c2
space
Wovchena May 27, 2024
312e0ae
optimum-cli from fork
Wovchena May 27, 2024
0286c96
different commit
Wovchena May 27, 2024
78666da
from branch
Wovchena May 27, 2024
140b59c
Merge branch 'generate_pipeline' into fix-abi
Wovchena May 27, 2024
a413be8
remove exrtra-index for SD
Wovchena May 27, 2024
de3a17e
reorder pip install
Wovchena May 27, 2024
4adaa33
revert unwanted changes
Wovchena May 27, 2024
0d7f893
Ubuntu-22
Wovchena May 27, 2024
82a7823
openvino_tokenizers~=2024.2.0.0
Wovchena May 27, 2024
323e7ac
remove -pre . --extra-index-url https://storage.openvinotoolkit.org/s…
Wovchena May 27, 2024
95e5a01
upgrade to prerelease
Wovchena May 27, 2024
4f22d86
revert requirements.txt
Wovchena May 27, 2024
d94ba2e
remove --pre, setupvars
Wovchena May 27, 2024
501cb8b
get openvino_tokenizers._ext_path
Wovchena May 27, 2024
336036a
take release pybind, fix soversion, and tokenizers folder
Wovchena May 27, 2024
3fd374f
spelling
Wovchena May 27, 2024
2eaf369
dont copy libs
Wovchena May 27, 2024
07e2385
put ov_tokenizers_path back
Wovchena May 27, 2024
7a79f8d
GENAI_BUILD_DIR=../../build
Wovchena May 28, 2024
2705867
Add extension near to genai library
Wovchena May 28, 2024
ce79a0e
include openvino/util/file_util.hpp
Wovchena May 28, 2024
f4d6c1f
get_absolute_file_path
Wovchena May 28, 2024
d99aca1
remove namepsace
Wovchena May 28, 2024
e375901
# include <limits.h>
Wovchena May 28, 2024
f9d9b18
more than one .
Wovchena May 28, 2024
2ac081c
till next dot
Wovchena May 28, 2024
0e18c9c
_ext_path
Wovchena May 28, 2024
4c10755
-1
Wovchena May 28, 2024
38076fc
+1
Wovchena May 28, 2024
d9edf2d
+1
Wovchena May 28, 2024
8c44fdd
path
Wovchena May 28, 2024
3030852
ext name
Wovchena May 28, 2024
dc885bb
with_openvino_tokenizers
Wovchena May 28, 2024
6856b5e
char
Wovchena May 28, 2024
5b5fd01
revert test
Wovchena May 28, 2024
014e9ee
tokenizers from form
Wovchena May 28, 2024
adc1f72
update fork
Wovchena May 28, 2024
4b806c0
lib
Wovchena May 28, 2024
cb81756
fix cherry-pick
Wovchena May 28, 2024
0110e51
update fork
Wovchena May 28, 2024
c97f2f8
dont spoil source dir
Wovchena May 28, 2024
934e438
Generator expressions to disable appending a per-configuration subdir…
Wovchena May 28, 2024
c976ff8
remove versions
Wovchena May 28, 2024
9483cb6
fix path
Wovchena May 28, 2024
ebad130
try
Wovchena May 28, 2024
38cbffd
try
Wovchena May 28, 2024
dc80b54
verbose
Wovchena May 28, 2024
25059f0
spelling
Wovchena May 28, 2024
3c5e130
rename file
Wovchena May 28, 2024
60cb221
remove build.tool-args
Wovchena May 28, 2024
c52dc22
Release
Wovchena May 28, 2024
9ef686a
dont speciify targets
Wovchena May 28, 2024
13ad3d2
Merge branch 'generate_pipeline' into add-extension-near-to-genai-lib…
Wovchena May 29, 2024
24e0e41
revert 81ec069
Wovchena May 29, 2024
47b8dc8
Update tests
Wovchena May 29, 2024
c116786
No rule to make target package
Wovchena May 29, 2024
efbb579
skip step
Wovchena May 29, 2024
0e2e953
test tokenizers are loaded
Wovchena May 29, 2024
4662e78
CPU
Wovchena May 29, 2024
f5a95d9
dont test Debug
Wovchena May 29, 2024
5fd221b
Merge branch 'generate_pipeline' into update-tests
Wovchena May 29, 2024
85f584a
retrigger
Wovchena May 29, 2024
76d6b45
minor
Wovchena May 29, 2024
82e6b08
16-cores
Wovchena May 29, 2024
97ee0cd
retrigger
Wovchena May 29, 2024
cbff245
retrigger
Wovchena May 29, 2024
db31fe8
retrigger
Wovchena May 29, 2024
6e52dc9
Merge branch 'generate_pipeline' into update-tests
Wovchena May 29, 2024
0317a68
-x
Wovchena May 29, 2024
a2e7e79
str
Wovchena May 29, 2024
b0cff66
less verbose
Wovchena May 29, 2024
74cbfb2
less verbose
Wovchena May 29, 2024
9b00070
less
Wovchena May 29, 2024
b8b4acb
less
Wovchena May 29, 2024
2935cbf
Merge branch 'generate_pipeline' into update-tests
Wovchena May 30, 2024
8f89d38
more
Wovchena May 30, 2024
493dde8
no cache
Wovchena May 30, 2024
0c5220d
conflicts
Wovchena May 30, 2024
b96798f
cache
Wovchena May 30, 2024
2ad2dd0
export
Wovchena May 30, 2024
1391d01
cached save
Wovchena May 30, 2024
435b6e6
rename
Wovchena May 30, 2024
f6ee0c9
rename
Wovchena May 30, 2024
8a0e499
16-cores
Wovchena May 30, 2024
b68bac8
no larg
Wovchena May 30, 2024
5907990
save memory
Wovchena May 30, 2024
9eb52f2
retrigger
Wovchena May 30, 2024
cdbe6d3
predownload
Wovchena May 30, 2024
81b7cb1
comment
Wovchena May 30, 2024
2acd90a
export name
Wovchena May 30, 2024
50ef656
exports
Wovchena May 30, 2024
aaf9b56
supress
Wovchena May 30, 2024
4f68779
revert
Wovchena May 30, 2024
6677a0f
Merge branch 'generate_pipeline' into update-tests
Wovchena May 30, 2024
dcd9e7b
test_operator_wit_callback_batch_fail
Wovchena May 30, 2024
05c2329
run test_beam_search_decoding only
Wovchena May 30, 2024
9b85195
test_decoding
Wovchena May 30, 2024
a932c29
remove Phi
Wovchena May 30, 2024
1c2f1fa
all
Wovchena May 30, 2024
a2f311c
Merge branch 'generate_pipeline' into update-tests
Wovchena May 30, 2024
b8911c3
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
231d3c2
add return bool to streamer to stop generation
pavel-esir May 31, 2024
258c34b
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
3526911
add return bool to streamer to stop generation
pavel-esir May 31, 2024
4965c81
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
1c9fcd1
add return bool to streamer to stop generation
pavel-esir May 31, 2024
469242d
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
dfb43d0
add return bool to streamer to stop generation
pavel-esir May 31, 2024
5d6527f
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
084330d
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
1d23bfe
dont test StopCriteria.EARLY because it fails
Wovchena May 31, 2024
91a9e15
update
Wovchena May 31, 2024
290e753
remove sudo apt-get install libtbb-dev
Wovchena May 31, 2024
6c40d97
submodule from fork
Wovchena May 31, 2024
f35da5c
update submodule
Wovchena May 31, 2024
4553500
update submodule
Wovchena May 31, 2024
4845adb
update submodule
Wovchena May 31, 2024
cadac67
update submodule
Wovchena May 31, 2024
d6e4667
Merge branch 'generate_pipeline' into update-tests
Wovchena May 31, 2024
94ec94b
set upstream submodule, add copyright headers, shorten commands
Wovchena Jun 3, 2024
5eff2ca
space
Wovchena Jun 3, 2024
0204658
dir link
Wovchena Jun 3, 2024
dda7120
retrigger
Wovchena Jun 3, 2024
8bd42a4
update
Wovchena Jun 3, 2024
fb5ffc5
Merge branch 'generate_pipeline' into update-tests
Wovchena Jun 3, 2024
6e7794f
skip
Wovchena Jun 3, 2024
3d3bbb2
Merge remote-tracking branch 'upstream/releases/2024/2' into update-t…
Wovchena Jun 3, 2024
d7542cb
test
Wovchena Jun 4, 2024
dd28fd7
put optimum-intel[openvino] back
Wovchena Jun 4, 2024
e9df462
flake8
Wovchena Jun 4, 2024
fb28adf
flake8
Wovchena Jun 4, 2024
dd8002d
optimum[openvino]==1.20.0
Wovchena Jun 4, 2024
15dbf2e
update tests/python_tests/requirements.txt
Wovchena Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/causal_lm_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model openlm-research/open_llama_3b_v2 open_llama_3b_v2
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -58,7 +57,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -228,7 +226,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen-7B-Chat Qwen-7B-Chat
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -256,7 +253,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model Qwen/Qwen1.5-7B-Chat Qwen1.5-7B-Chat
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -284,7 +280,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model microsoft/phi-2 phi-2
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j 15
Expand Down Expand Up @@ -312,7 +307,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model argilla/notus-7b-v1 notus-7b-v1
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -340,7 +334,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model databricks/dolly-v2-3b dolly-v2-3b
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model databricks/dolly-v2-7b dolly-v2-7b
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
Expand Down Expand Up @@ -379,7 +372,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down Expand Up @@ -424,7 +416,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model microsoft/phi-1_5 phi-1_5
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j 15
Expand Down Expand Up @@ -469,7 +460,6 @@ jobs:
source ./ov/setupvars.sh
python -m pip install --upgrade-strategy eager -r ./text_generation/causal_lm/cpp/requirements.txt
python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
sudo apt-get install libtbb-dev
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model ikala/redpajama-3b-chat redpajama-3b-chat
cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
cmake --build ./build/ --config Release -j
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/genai_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
matrix:
build-type: [Release, Debug]
runs-on: ubuntu-20.04
env:
CMAKE_BUILD_PARALLEL_LEVEL: null
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -19,20 +21,17 @@ jobs:
- run: mkdir ./ov/
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_ubuntu20_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
- run: sudo apt-get install libtbb-dev
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ -B ./build/
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config ${{ matrix.build-type }} --target package -j
- run: source ./ov/setupvars.sh && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix ov
- run: ov/samples/cpp/build_samples.sh -i ${{ github.workspace }}/s\ pace
if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
- run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
if: ${{ 'Release' == matrix.build-type }}
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -S ./ov/samples/cpp/ -B ./samples\ build/ && cmake --build ./samples\ build/ --config ${{ matrix.build-type }} -j && cmake --install ./samples\ build/ --config ${{ matrix.build-type }} --component samples_bin --prefix s\ pace
if: ${{ 'Release' != matrix.build-type }}
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
if: ${{ 'Release' == matrix.build-type }}
- run: source ./ov/setupvars.sh && python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
- run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
if: ${{ 'Release' == matrix.build-type }}
- run: source ./ov/setupvars.sh && timeout 50s ${{ github.workspace }}/s\ pace/samples_bin/greedy_causal_lm ./TinyLlama-1.1B-Chat-v1.0/ ""
if: ${{ 'Release' == matrix.build-type }}

macos_genai_package:
strategy:
Expand Down Expand Up @@ -68,6 +67,8 @@ jobs:
matrix:
build-type: [Release, Debug]
runs-on: windows-latest
env:
CMAKE_BUILD_PARALLEL_LEVEL: null
defaults:
run:
shell: cmd
Expand All @@ -85,10 +86,10 @@ jobs:
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && cmake --install ./build/ --config ${{ matrix.build-type }} --prefix w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\samples\cpp\build_samples_msvc.bat -i "${{ github.workspace }}/samples_install"
if: ${{ 'Release' == matrix.build-type }} # build_samples enforces Release build
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
if: ${{ 'Release' == matrix.build-type }}
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
if: ${{ 'Release' == matrix.build-type }}
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install --upgrade-strategy eager -r text_generation/causal_lm/cpp/requirements.txt
if: ${{ 'Release' == matrix.build-type }}
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
if: ${{ 'Release' == matrix.build-type }}
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && "${{ github.workspace }}/samples_install/samples_bin/greedy_causal_lm" .\TinyLlama-1.1B-Chat-v1.0\ ""
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/genai_python_lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ concurrency:
cancel-in-progress: true
jobs:
ubuntu_genai_python_lib:
# A tokenizers' dependency fails to compile on ubuntu-20 n CenOS7 env
# A tokenizers' dependency fails to compile on ubuntu-20 n CenOS7 env.
runs-on: ubuntu-22.04
env:
# A tokenizers' dependency fails to compile with Ninja in CenOS7 env
# A tokenizers' dependency fails to compile with Ninja in CenOS7 env.
CMAKE_GENERATOR: Unix Makefiles
CMAKE_BUILD_PARALLEL_LEVEL: null
steps:
Expand All @@ -19,25 +19,20 @@ jobs:
with:
python-version: 3.8
- run: mkdir ./ov/
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_centos7_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz # Install CentOS7 instead of Ubuntu to match PyPI distribution ABI
# Install CentOS7 instead of Ubuntu to match PyPI distribution ABI
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.2.0rc1/linux/l_openvino_toolkit_centos7_2024.2.0.dev20240524_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
- 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.
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --verbose
- run: source ./ov/setupvars.sh && PYTHONPATH=./build/ python -c "from openvino_genai import LLMPipeline"
- run: source ./ov/setupvars.sh && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
# The tests can convert the model themselves, but underlying OpenVINO silently saves empty .xml if there's no space.
- run: source ./ov/setupvars.sh && optimum-cli export openvino --trust-remote-code --weight-format fp16 --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 TinyLlama-1.1B-Chat-v1.0
# --exitfirst to exit instantly on first error because tests are slow and produce lots of logs slowing down GitHub Actions logs view.
- run: source ./ov/setupvars.sh && PYTHONPATH=./build/:$PYTHONPATH python -m pytest ./tests/python_tests/test_generate_api.py --exitfirst -m precommit
- run: source ./ov/setupvars.sh && python -m pip install . --config-settings=build-dir="build" --verbose
- run: python -c "from openvino_genai import LLMPipeline"
- name: GenAI Python API tests
run: |
cd ./tests/python_tests/
python -m pip install -r requirements.txt
models=$(python list_test_models.py)
echo "$models" | while read -r model_name model_path; do
optimum-cli export openvino --trust-remote-code --weight-format fp16 --model "$model_name" "$model_path"
done
GENAI_BUILD_DIR=../../build python -m pytest test_generate_api.py -v -m precommit
- run: python -m pytest ./tests/python_tests/test_generate_api.py --exitfirst -m precommit

macos_genai_python_lib:
runs-on: macos-12
Expand Down Expand Up @@ -89,9 +84,10 @@ jobs:
- run: unzip ov.zip
# 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.dev20240524_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release --verbose
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install . --verbose
- run: python -c "from openvino_genai import LLMPipeline"
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && cmake --build ./build/ --config Release -j
- run: set "PYTHONPATH=./build/" && call w_openvino_toolkit_windows_2024.2.0.dev20240524_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: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install ./thirdparty/openvino_tokenizers/[transformers] -r ./requirements-build.txt -r ./tests/python_tests/requirements.txt --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/pre-release
# cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that.
- run: set "PYTHONPATH=./build/" && call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pytest ./tests/python_tests/test_generate_api.py --exitfirst -m precommit
- run: call w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat && python -m pip install . --config-settings=build-dir="build" --verbose

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each line calls w_openvino_toolkit_windows_2024.2.0.dev20240524_x86_64\setupvars.bat, which make readability worse
can we use multiline script mode? I mean - run: | which assumes multiple lines after it.

- run: python -m pytest ./tests/python_tests/test_generate_api.py --exitfirst -m precommit
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ dependencies = [
]

[tool.scikit-build]
cmake.source-dir = "./"
cmake.build-type = "Release"
cmake.source-dir = "./"
cmake.targets = ["py_generate_pipeline"] # Adding genai would trigger a Release build and Debug build after it. py_generate_pipeline depends on genai and genai will be built anyway. It's not been investigated why both build types are triggered.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe because of ninja multi-config which builds several build types at the same time?
You can probably use the same openvinotoolkit/openvino_tokenizers#162

install.components = ["wheel_genai"]
sdist.cmake = true
wheel.packages = ["src/python/openvino_genai"]
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ov_genai_build_jinja2cpp()

file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")

set(TARGET_NAME genai)
set(TARGET_NAME openvino_genai)
add_library(${TARGET_NAME} SHARED ${SOURCE_FILES})
add_library(openvino::genai ALIAS ${TARGET_NAME})

Expand All @@ -53,7 +53,7 @@ target_compile_features(${TARGET_NAME} PUBLIC cxx_std_17)
# Extract two last digits from CMAKE_PROJECT_VERSION_MAJOR because SOVERSION can only contain up to 4 symbols.
string(REGEX MATCH [=[[0-9][0-9]$]=] MAJOR_SUFFIX ${CMAKE_PROJECT_VERSION_MAJOR})
set_target_properties(${TARGET_NAME} PROPERTIES
OUTPUT_NAME openvino_genai
EXPORT_NAME genai
VERSION ${CMAKE_PROJECT_VERSION}
SOVERSION ${MAJOR_SUFFIX}${CMAKE_PROJECT_VERSION_MINOR}${CMAKE_PROJECT_VERSION_PATCH}
ARCHIVE_OUTPUT_DIRECTORY "$<1:${CMAKE_BINARY_DIR}/openvino_genai/>"
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/OpenVINOGenAIConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
include(CMakeFindDependencyMacro)
find_dependency(OpenVINO COMPONENTS Runtime)

if(NOT TARGET genai)
if(NOT TARGET openvino_genai)
include("${CMAKE_CURRENT_LIST_DIR}/OpenVINOGenAITargets.cmake")
endif()

check_required_components(openvino_genai)
check_required_components(OpenVINOGenAI)
4 changes: 2 additions & 2 deletions src/cpp/include/openvino/genai/llm_pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ class OPENVINO_GENAI_EXPORTS LLMPipeline {
std::unique_ptr<LLMPipelineImpl> m_pimpl;
};

std::pair<std::string, Any> streamer(StreamerVariant func);
std::pair<std::string, Any> generation_config(const GenerationConfig& config);
OPENVINO_GENAI_EXPORTS std::pair<std::string, Any> streamer(StreamerVariant func);
OPENVINO_GENAI_EXPORTS std::pair<std::string, Any> generation_config(const GenerationConfig& config);

} // namespace genai
} // namespace ov
6 changes: 4 additions & 2 deletions src/cpp/include/openvino/genai/visibility.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
// Copyright (C) 2023-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#pragma once

#include "openvino/core/visibility.hpp"

#ifdef genai_EXPORTS
#ifdef openvino_genai_EXPORTS
# define OPENVINO_GENAI_EXPORTS OPENVINO_CORE_EXPORTS
#else
# define OPENVINO_GENAI_EXPORTS OPENVINO_CORE_IMPORTS
#endif // genai_EXPORTS
#endif // openvino_genai_EXPORTS
Loading
Loading