From 457341254c4e234b7fe224b94ffeae85235ed381 Mon Sep 17 00:00:00 2001 From: Alexander Suvorov Date: Mon, 22 Jul 2024 13:59:22 +0200 Subject: [PATCH 1/4] Add ov::Tensor note --- src/docs/BUILD.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/docs/BUILD.md b/src/docs/BUILD.md index 1aee73bfb..b518abf00 100644 --- a/src/docs/BUILD.md +++ b/src/docs/BUILD.md @@ -29,6 +29,9 @@ cmake --install ./build/ --config Release --prefix ov ``` +> **NOTE**: There is a known Python API issue with `ov::Tensor`. The issue is reproduced when building OpenVINO GenAI from sources while using OpenVINO from archives. Using `ov::Tensor` with OpenVINO GenAI will fail on Windows and Linux Systems. Possible errors: `TypeError: generate(): incompatible function arguments.`, `TypeError: __init__(): incompatible constructor arguments.`, `TypeError: Unregistered type : ov::Tensor`. +The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources using the same build environment. Or to install OpenVINO GenAI from [distribution channels](https://docs.openvino.ai/2024/get-started/install-openvino.html). + ## Build for Windows Systems ### Software Requirements @@ -60,6 +63,9 @@ cmake --install ./build/ --config Release --prefix ov ``` +> **NOTE**: There is a known Python API issue with `ov::Tensor`. The issue is reproduced when building OpenVINO GenAI from sources while using OpenVINO from archives. Using `ov::Tensor` with OpenVINO GenAI will fail on Windows and Linux Systems. Possible errors: `TypeError: generate(): incompatible function arguments.`, `TypeError: __init__(): incompatible constructor arguments.`, `TypeError: Unregistered type : ov::Tensor`. +The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources using the same build environment. Or to install OpenVINO GenAI from [distribution channels](https://docs.openvino.ai/2024/get-started/install-openvino.html). + ## Build for macOS Systems ### Software Requirements From 577a9e4dd03e7d2a69f166e6bc5b4023827aa913 Mon Sep 17 00:00:00 2001 From: Alexander Suvorov Date: Mon, 22 Jul 2024 16:20:39 +0200 Subject: [PATCH 2/4] Use build OpenVINO from sources instructions --- src/docs/BUILD.md | 51 ++++++++++++---------------------- thirdparty/openvino_tokenizers | 2 +- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/src/docs/BUILD.md b/src/docs/BUILD.md index b518abf00..f59b2b04d 100644 --- a/src/docs/BUILD.md +++ b/src/docs/BUILD.md @@ -1,5 +1,8 @@ # How to Build OpenVINO™ GenAI +> **NOTE**: There is a known Python API issue with `ov::Tensor`. The issue is reproduced when building OpenVINO GenAI from sources while using OpenVINO from archives. Using `ov::Tensor` with OpenVINO GenAI fails. Possible errors: `TypeError: generate(): incompatible function arguments.`, `TypeError: __init__(): incompatible constructor arguments.`, `TypeError: Unregistered type : ov::Tensor`. +The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources using the same build environment. Or to install prebuilt OpenVINO GenAI from [distribution channels](https://docs.openvino.ai/2024/get-started/install-openvino.html). + ## Build for Linux Systems ### Software Requirements @@ -10,28 +13,21 @@ ### Build Instructions -1. Clone OpenVINO GenAI repository and init submodules: +1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) +2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) +3. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -2. Download OpenVINO archive and install dependencies: - ```sh - mkdir ./ov/ - curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.3.0rc1/linux/l_openvino_toolkit_ubuntu20_2024.3.0.dev20240711_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz - sudo ./ov/install_dependencies/install_openvino_dependencies.sh - ``` -3. Build the project: +4. Build the project: ```sh - source ./ov/setupvars.sh + source /setupvars.sh cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov ``` -> **NOTE**: There is a known Python API issue with `ov::Tensor`. The issue is reproduced when building OpenVINO GenAI from sources while using OpenVINO from archives. Using `ov::Tensor` with OpenVINO GenAI will fail on Windows and Linux Systems. Possible errors: `TypeError: generate(): incompatible function arguments.`, `TypeError: __init__(): incompatible constructor arguments.`, `TypeError: Unregistered type : ov::Tensor`. -The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources using the same build environment. Or to install OpenVINO GenAI from [distribution channels](https://docs.openvino.ai/2024/get-started/install-openvino.html). - ## Build for Windows Systems ### Software Requirements @@ -43,29 +39,21 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ### Build Instructions -1. Clone OpenVINO GenAI repository and init submodules: +1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) +2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) +3. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -2. Download OpenVINO archive and install dependencies: +4. Build the project: ```sh - mkdir ./ov/ - curl --output ov.zip https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.3.0rc1/windows/w_openvino_toolkit_windows_2024.3.0.dev20240711_x86_64.zip - unzip ov.zip - mklink /D ov w_openvino_toolkit_windows_2024.3.0.dev20240711_x86_64 - ``` -3. Build the project: - ```sh - call ov\setupvars.bat + call \setupvars.bat cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov ``` -> **NOTE**: There is a known Python API issue with `ov::Tensor`. The issue is reproduced when building OpenVINO GenAI from sources while using OpenVINO from archives. Using `ov::Tensor` with OpenVINO GenAI will fail on Windows and Linux Systems. Possible errors: `TypeError: generate(): incompatible function arguments.`, `TypeError: __init__(): incompatible constructor arguments.`, `TypeError: Unregistered type : ov::Tensor`. -The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources using the same build environment. Or to install OpenVINO GenAI from [distribution channels](https://docs.openvino.ai/2024/get-started/install-openvino.html). - ## Build for macOS Systems ### Software Requirements @@ -83,19 +71,16 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ### Build Instructions -1. Clone OpenVINO GenAI repository and init submodules: +1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) +2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) +3. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -2. Download OpenVINO archive and install dependencies: - ```sh - mkdir ./ov/ - curl https://storage.openvinotoolkit.org/repositories/openvino/packages/pre-release/2024.3.0rc1/macos/m_openvino_toolkit_macos_12_6_2024.3.0.dev20240711_x86_64.tgz | tar --directory ./ov/ --strip-components 1 -xz - ``` -3. Build the project: +4. Build the project: ```sh - source ./ov/setupvars.sh + source /setupvars.sh cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov diff --git a/thirdparty/openvino_tokenizers b/thirdparty/openvino_tokenizers index 04795c1b7..880d569cd 160000 --- a/thirdparty/openvino_tokenizers +++ b/thirdparty/openvino_tokenizers @@ -1 +1 @@ -Subproject commit 04795c1b78c61e3294d1744c78a8ebb5e129256c +Subproject commit 880d569cd2f5d52165b940542e2f9190172ed2cb From 5de791f9e5c9093f579f7d868df11e3c31ba4a82 Mon Sep 17 00:00:00 2001 From: Alexander Suvorov Date: Mon, 22 Jul 2024 16:24:18 +0200 Subject: [PATCH 3/4] Rollback tokenizers version --- thirdparty/openvino_tokenizers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/openvino_tokenizers b/thirdparty/openvino_tokenizers index 880d569cd..04795c1b7 160000 --- a/thirdparty/openvino_tokenizers +++ b/thirdparty/openvino_tokenizers @@ -1 +1 @@ -Subproject commit 880d569cd2f5d52165b940542e2f9190172ed2cb +Subproject commit 04795c1b78c61e3294d1744c78a8ebb5e129256c From f0429a8d4a2cc98700094b4a6f1ebe13264f97f0 Mon Sep 17 00:00:00 2001 From: Alexander Suvorov Date: Mon, 22 Jul 2024 18:49:07 +0200 Subject: [PATCH 4/4] Use link to wiki. Use INSTALL_DIR reference --- src/docs/BUILD.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/docs/BUILD.md b/src/docs/BUILD.md index f59b2b04d..3b89995dc 100644 --- a/src/docs/BUILD.md +++ b/src/docs/BUILD.md @@ -13,16 +13,16 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ### Build Instructions -1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) -2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) -3. Clone OpenVINO GenAI repository and init submodules: +1. Build and install OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/wiki#how-to-build). +The path to the openvino install directory is referred as throughout the document. +2. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -4. Build the project: +3. Build the project: ```sh - source /setupvars.sh + source /setupvars.sh cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov @@ -39,16 +39,16 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ### Build Instructions -1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) -2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) -3. Clone OpenVINO GenAI repository and init submodules: +1. Build and install OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/wiki#how-to-build) +The path to the openvino install directory is referred as throughout the document. +2. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -4. Build the project: +3. Build the project: ```sh - call \setupvars.bat + call \setupvars.bat cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov @@ -71,16 +71,16 @@ The preferred approach is to build both OpenVINO and OpenVINO GenAI from sources ### Build Instructions -1. Build OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md) -2. Install OpenVINO following the [instructions](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/installing.md) -3. Clone OpenVINO GenAI repository and init submodules: +1. Build and install OpenVINO from sources following the [instructions](https://github.com/openvinotoolkit/openvino/wiki#how-to-build) +The path to the openvino install directory is referred as throughout the document. +2. Clone OpenVINO GenAI repository and init submodules: ```sh git clone --recursive https://github.com/openvinotoolkit/openvino.genai.git cd openvino.genai ``` -4. Build the project: +3. Build the project: ```sh - source /setupvars.sh + source /setupvars.sh cmake -DCMAKE_BUILD_TYPE=Release -S ./ -B ./build/ cmake --build ./build/ --config Release --target package -j cmake --install ./build/ --config Release --prefix ov