Skip to content

Commit 8976cad

Browse files
committed
alias
1 parent c22d6c1 commit 8976cad

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.github/workflows/genai_package.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: genai_package
2+
on: pull_request
3+
jobs:
4+
genai_package_ubuntu:
5+
runs-on: ubuntu-20.04
6+
steps:
7+
- uses: actions/checkout@v4
8+
with:
9+
submodules: recursive
10+
- uses: actions/setup-python@v4
11+
with:
12+
python-version: 3.8
13+
- run: mkdir ./ov/
14+
- run: curl https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.1.0-14758-22bd6ff0494/l_openvino_toolkit_centos7_2024.1.0.dev20240315_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz # Install CentOS7 instead of Ubuntu to match PyPI distribution ABI
15+
- run: sudo ./ov/install_dependencies/install_openvino_dependencies.sh
16+
- run: source ./ov/setupvars.sh && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
17+
- run: source ./ov/setupvars.sh && cmake --build ./build/ --config Release --target package -j
18+
19+
genai_package_windows:
20+
runs-on: windows-latest
21+
defaults:
22+
run:
23+
shell: cmd
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
- uses: actions/setup-python@v4
29+
with:
30+
python-version: 3.8
31+
- run: curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2024.1.0-14645-e6dc0865128/w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64.zip
32+
- run: unzip ov.zip
33+
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/
34+
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && cmake --build ./build/ --config Release --target package -j
35+
- run: python -m pip install "numpy<1.27"
36+
- run: set "PYTHONPATH=./src/python;" && call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && python -c "from openvino_genai.py_generate_pipeline import LLMPipeline" # cmd evaluates variables in a different way. Setting PYTHONPATH before setupvars.bat instead of doing that after solves that.
37+
- run: call w_openvino_toolkit_windows_2024.1.0.dev20240304_x86_64\setupvars.bat && python -m pip install .
38+
- run: python -c "from openvino_genai.py_generate_pipeline import LLMPipeline"

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Release" "Debug" "RelWithD
1010
project(openvino_genai)
1111

1212
add_subdirectory(./thirdparty/openvino_tokenizers/ "${CMAKE_CURRENT_BINARY_DIR}/openvino_tokenizers/")
13-
set(openvino_genai_VERSION 2024.1.0.0)
13+
set(openvino_genai_VERSION 2024.1.0.0) # TODO: set project version
1414
add_subdirectory(src)
1515
add_subdirectory(text_generation/causal_lm/cpp)
1616

src/cpp/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
4646

4747
set(TARGET_NAME genai)
4848
add_library(${TARGET_NAME} SHARED ${SOURCE_FILES})
49+
add_library(openvino::genai ALIAS genai)
4950

5051
target_include_directories(${TARGET_NAME}
5152
# TODO: remove it, because beam_search algo should not be exposed to end users
+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
include(CMakeFindDependencyMacro)
22
find_dependency(OpenVINO COMPONENTS Runtime)
33

4-
include("${CMAKE_CURRENT_LIST_DIR}/openvino_genaiTargets.cmake")
4+
if(NOT TARGET genai)
5+
include("${CMAKE_CURRENT_LIST_DIR}/openvino_genaiTargets.cmake")
6+
endif()

0 commit comments

Comments
 (0)