- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to get openvino 2022/1.1 to work on Ubuntu 22.0 and talk to my NCS2 stick I have run into a problem. This is where I have got to so far.
1. Cloned the openvino repo.
2. Checked out the releases/2022/1.1 branch.
3. Initialised the submodules.
4. The build encountered a number compiler warnings that were treated as errors.
5. I fixed the error in src/core/src/type/bfloat16.cpp.
`@@ -57,7 +57,7 @@ size_t bfloat16::size() const {
}
bfloat16::operator float() const {
- uint32_t tmp = (static_cast<uint32_t>(m_value) << 16);
+ static uint32_t tmp = (static_cast<uint32_t>(m_value) << 16);
const float* f = reinterpret_cast<const float*>(&tmp);
return *f;
}`
6. I realised all the other errors were in a template in single include file and that it would not be easy to fix. So I turned off the treat warnings as errors flag in the CMake config.
7. I stuck my head in a bucket of cold water.
8. I got as far as building the python wheels and hit a problem with the numpy version. So I took a chance and modified src/bindings/python/requirements.txt to remove the top limit on the numpy version. This caused an error in src/bindings/python/wheel/CMakeLists.txt.
`@@ -33,7 +33,7 @@ endforeach()
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import wheel.bdist_wheel ; print(f'{wheel.bdist_wheel.get_abi_tag()}')" OUTPUT_VARIABLE PYTHON_ABI)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')" OUTPUT_VARIABLE INTERPRETER)
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{next(tags._platform_tags())}')" OUTPUT_VARIABLE WHEEL_PLATFORM)
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import wheel.vendored.packaging.tags as tags ; print(f'{next(tags.platform_tags())}')" OUTPUT_VARIABLE WHEEL_PLATFORM)
string(STRIP ${PYTHON_ABI} PYTHON_ABI)
string(STRIP ${INTERPRETER} INTERPRETER)
string(STRIP ${WHEEL_PLATFORM} WHEEL_PLATFORM)
`
9. This finally got everything to build.
10. But as I expected there was a runtime error!
`Python 3.10.6 (main, May 29 2023, 11:10:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from openvino.runtime import Core
/home/roger/.local/lib/python3.10/site-packages/openvino/runtime/utils/types.py:24: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
(Type.boolean, np.bool),
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/roger/.local/lib/python3.10/site-packages/openvino/runtime/__init__.py", line 38, in <module>
from openvino.runtime.ie_api import Core
File "/home/roger/.local/lib/python3.10/site-packages/openvino/runtime/ie_api.py", line 16, in <module>
from openvino.runtime.utils.types import get_dtype
File "/home/roger/.local/lib/python3.10/site-packages/openvino/runtime/utils/types.py", line 24, in <module>
(Type.boolean, np.bool),
File "/home/roger/.local/lib/python3.10/site-packages/numpy/__init__.py", line 313, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'bool_'?
>>>
`
Numpy strikes again.
Has anyone been down this path before?
Has anyone got any ideas on how to get past with minimal intervention in the source?
Help!
Roger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
to clarify, could you share your build commands till the point of error? It seems that you only shared your troubleshooting commands.
Cordially,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the history of what I did. I edited it for clarity.
git clone https://github.com/openvinotoolkit/openvino.git
cd openvino
git checkout releases/2022/1.1
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release
make --jobs=$(nproc --all)
This gave a number of warnings that were treated as errors. I fixed those as I detailed in in my original post.
I have now started a parallel track building using Ubuntu 20.04 in QEMU/KVM. I have run into the buffers on that track with openvino failing to find the ncs2 device even though it shows up in lsusb. But that is a question for a new thread!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Generally,
OpenVINO 2022.1.1 is officially validated only on these Ubuntu versions:
- Ubuntu 18.04 (64-bit) with default GCC 7.5.0
- Ubuntu 20.04 (64-bit) with default GCC 9.3.0
You may refer to the validated software here and here.
I also noticed that building OV 2022.1.1 in Ubuntu 22.04 produced some errors which is expected since it's not officially validated.
To ensure that the OV 2022.1.1 really works, it is recommended to use the Ubuntu version that is officially validated.
Is there any specific reason to be using Ubuntu 22.04 with OpenVINO 2022.1?
Cordially,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need 2022.1 because I want to drive a NCS2 Myriad X.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I understand that you need OV 2022.1 because of VPU/NCS2.
You could use Ubuntu 20.04 (officially validated by OpenVINO) instead 22.04 with it, unless you have specific reason for using Ubuntu 22.04?
Cordially,
Iffa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad that your issue is resolved.
Thanks for informing.
I'm proceeding to close this thread.
Intel will no longer monitor this thread since this issue has been resolved. If you need any additional information from Intel, please submit a new question.
Cordially,
Iffa

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page