Skip to content

Commit

Permalink
Add note for pybind ov::Tensor issue (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
as-suvorov authored Jul 22, 2024
1 parent 7bf42f1 commit bad01b9
Showing 1 changed file with 15 additions and 24 deletions.
39 changes: 15 additions & 24 deletions src/docs/BUILD.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,20 +13,16 @@

### Build Instructions

1. 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 <INSTALL_DIR> 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
```
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:
```sh
source ./ov/setupvars.sh
source <INSTALL_DIR>/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
Expand All @@ -40,21 +39,16 @@

### Build Instructions

1. 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 <INSTALL_DIR> 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
```
2. Download OpenVINO archive and install dependencies:
```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 <INSTALL_DIR>\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
Expand All @@ -77,19 +71,16 @@

### Build Instructions

1. 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 <INSTALL_DIR> 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
```
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:
```sh
source ./ov/setupvars.sh
source <INSTALL_DIR>/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
Expand Down

0 comments on commit bad01b9

Please sign in to comment.