Compare commits
33
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac206454d7 | ||
|
|
9839b55081 | ||
|
|
8af1f18596 | ||
|
|
5004f555ab | ||
|
|
3881079d6d | ||
|
|
a771bf3908 | ||
|
|
30ae45407d | ||
|
|
d378c662b4 | ||
|
|
9068b4838e | ||
|
|
3f5d9d6e67 | ||
|
|
fceb7472fe | ||
|
|
30209c153f | ||
|
|
ff51f406ca | ||
|
|
97e2f1854d | ||
|
|
dd04073708 | ||
|
|
f74f4cea10 | ||
|
|
3b3676191b | ||
|
|
f9a22386b1 | ||
|
|
5bd345b42b | ||
|
|
687446a2fc | ||
|
|
d61885ee38 | ||
|
|
137f39e1d3 | ||
|
|
b15c5f72e4 | ||
|
|
16bc18599c | ||
|
|
40c62bdf68 | ||
|
|
23cfdc3730 | ||
|
|
26b4844ebd | ||
|
|
642014e4f5 | ||
|
|
eafe1c28ad | ||
|
|
4638b2bde4 | ||
|
|
c34780b4ae | ||
|
|
af91567d48 | ||
|
|
ecc8fda9cf |
+8
-1
@@ -261,12 +261,19 @@ jobs:
|
||||
displayName: 'Remove debian dependencies'
|
||||
condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
|
||||
continueOnError: false
|
||||
|
||||
- script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
|
||||
displayName: 'Install wheel packages'
|
||||
|
||||
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake
|
||||
displayName: 'Install Layer Tests'
|
||||
- script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
python3 -m pip install $(INSTALL_DIR)/tools/openvino-*
|
||||
python3 -m pip install $(INSTALL_DIR)/tools/openvino_dev-*
|
||||
displayName: 'Install python wheels'
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake
|
||||
|
||||
@@ -138,6 +138,7 @@ jobs:
|
||||
-DENABLE_PYTHON=OFF
|
||||
-DENABLE_NVIDIA=ON
|
||||
-DENABLE_TESTS=ON
|
||||
-DENABLE_DATA=OFF
|
||||
/root/repos/openvino &&
|
||||
/root/w/ninja -v CudaFuncTests CudaUnitTests"
|
||||
workingDirectory: $(WORK_DIR)
|
||||
|
||||
@@ -62,6 +62,8 @@ jobs:
|
||||
python3 -m pip install -r docs/requirements.txt --user
|
||||
cd docs/openvino_sphinx_theme
|
||||
python3 setup.py install --user
|
||||
cd ../openvino_custom_sphinx_sitemap
|
||||
python3 setup.py install --user
|
||||
cd ../..
|
||||
# install doxyrest
|
||||
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-2.1.3/doxyrest-2.1.3-linux-amd64.tar.xz
|
||||
|
||||
@@ -92,8 +92,8 @@ jobs:
|
||||
- name: Install Clang dependency
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13
|
||||
sudo apt --assume-yes install libclang-14-dev
|
||||
sudo apt --assume-yes remove clang-7 clang-8 clang-9 clang-10 clang-11 clang-12 clang-13 clang-15
|
||||
sudo apt --assume-yes install clang-14 libclang-14-dev
|
||||
|
||||
- name: Install Python-based dependencies
|
||||
run: python3 -m pip install -r cmake/developer_package/ncc_naming_style/requirements_dev.txt
|
||||
|
||||
@@ -110,12 +110,12 @@ ie_dependent_option (GAPI_TEST_PERF "if GAPI unit tests should examine performan
|
||||
|
||||
ie_dependent_option (ENABLE_MYRIAD_MVNC_TESTS "functional and behavior tests for mvnc api" OFF "ENABLE_TESTS;ENABLE_INTEL_MYRIAD" OFF)
|
||||
|
||||
ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF)
|
||||
|
||||
ie_dependent_option (ENABLE_BEH_TESTS "tests oriented to check OpenVINO Runtime API correctness" ON "ENABLE_TESTS" OFF)
|
||||
|
||||
ie_dependent_option (ENABLE_FUNCTIONAL_TESTS "functional tests" ON "ENABLE_TESTS" OFF)
|
||||
|
||||
ie_dependent_option (ENABLE_DATA "fetch models from testdata repo" ON "ENABLE_FUNCTIONAL_TESTS;NOT ANDROID" OFF)
|
||||
|
||||
ie_option (ENABLE_SAMPLES "console samples are part of OpenVINO Runtime package" ON)
|
||||
|
||||
ie_option (ENABLE_OPENCV "enables custom OpenCV download" OFF)
|
||||
|
||||
@@ -37,6 +37,7 @@ include(CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency(OpenVINO
|
||||
PATHS "${CMAKE_CURRENT_LIST_DIR}"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../openvino${InferenceEngine_VERSION}"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# ******************************************************************************
|
||||
# Copyright 2017-2022 Intel Corporation
|
||||
# Copyright 2017-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -15,7 +15,7 @@
|
||||
# ******************************************************************************
|
||||
#
|
||||
#
|
||||
# FindNGraph
|
||||
# ngraph config file
|
||||
# ------
|
||||
#
|
||||
# This script defines the following variables and imported targets:
|
||||
@@ -44,7 +44,7 @@ include(CMakeFindDependencyMacro)
|
||||
|
||||
find_dependency(OpenVINO
|
||||
PATHS "${CMAKE_CURRENT_LIST_DIR}"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ngraph"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/../openvino${ngraph_VERSION}"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
|
||||
@@ -490,6 +490,7 @@ Some of TensorFlow operations do not match any OpenVINO operations. Yet, they ar
|
||||
| Abs |
|
||||
| Acos |
|
||||
| Acosh |
|
||||
| Add |
|
||||
| And |
|
||||
| ArgMin |
|
||||
| ArgMax |
|
||||
|
||||
@@ -8,48 +8,20 @@ There are several public versions of EfficientDet model implementation available
|
||||
convert models from the [repository](https://github.com/google/automl/tree/master/efficientdet)
|
||||
(commit 96e1fee) to the OpenVINO format.
|
||||
|
||||
### Getting a Frozen TensorFlow Model
|
||||
Download and extract the model checkpoint [efficientdet-d4.tar.gz](https://storage.googleapis.com/cloud-tpu-checkpoints/efficientdet/coco2/efficientdet-d4.tar.gz) referenced in the **Pretrained EfficientDet Checkpoints** section of the model repository:
|
||||
|
||||
Follow the instructions below to get frozen TensorFlow EfficientDet model. EfficientDet-D4 model is an example:
|
||||
|
||||
1. Clone the repository:<br>
|
||||
```sh
|
||||
git clone https://github.com/google/automl
|
||||
cd automl/efficientdet
|
||||
```
|
||||
2. (Optional) Checkout to the commit that the conversion was tested on:<br>
|
||||
```sh
|
||||
git checkout 96e1fee
|
||||
```
|
||||
3. Install required dependencies:<br>
|
||||
```sh
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install --upgrade tensorflow-model-optimization
|
||||
```
|
||||
4. Download and extract the model checkpoint [efficientdet-d4.tar.gz](https://storage.googleapis.com/cloud-tpu-checkpoints/efficientdet/coco2/efficientdet-d4.tar.gz)
|
||||
referenced in the **"Pretrained EfficientDet Checkpoints"** section of the model repository:<br>
|
||||
```sh
|
||||
wget https://storage.googleapis.com/cloud-tpu-checkpoints/efficientdet/coco2/efficientdet-d4.tar.gz
|
||||
tar zxvf efficientdet-d4.tar.gz
|
||||
```
|
||||
5. Freeze the model:<br>
|
||||
```sh
|
||||
mo --runmode=saved_model --model_name=efficientdet-d4 --ckpt_path=efficientdet-d4 --saved_model_dir=savedmodeldir
|
||||
```
|
||||
As a result, the frozen model file `savedmodeldir/efficientdet-d4_frozen.pb` will be generated.
|
||||
|
||||
> **NOTE**: For custom trained models, specify `--hparams` flag to `config.yaml` which was used during training.
|
||||
|
||||
> **NOTE**: If you see an error *AttributeError: module 'tensorflow_core.python.keras.api._v2.keras.initializers' has no attribute 'variance_scaling'*, apply the fix from the [patch](https://github.com/google/automl/pull/846).
|
||||
|
||||
### Converting an EfficientDet TensorFlow Model to the IR
|
||||
|
||||
To generate the IR of the EfficientDet TensorFlow model, run:<br>
|
||||
|
||||
```sh
|
||||
mo \
|
||||
--input_model savedmodeldir/efficientdet-d4_frozen.pb \
|
||||
--transformations_config front/tf/automl_efficientdet.json \
|
||||
--input_meta_graph efficientdet-d4/model.meta \
|
||||
--input_shape [1,$IMAGE_SIZE,$IMAGE_SIZE,3] \
|
||||
--reverse_input_channels
|
||||
```
|
||||
@@ -59,12 +31,6 @@ EfficientDet models were trained with different input image sizes. To determine
|
||||
dictionary in the [hparams_config.py](https://github.com/google/automl/blob/96e1fee/efficientdet/hparams_config.py#L304) file.
|
||||
The attribute `image_size` specifies the shape to be defined for the model conversion.
|
||||
|
||||
The `transformations_config` command line parameter specifies the configuration json file containing hints
|
||||
for the Model Optimizer on how to convert the model and trigger transformations implemented in the
|
||||
`<PYTHON_SITE_PACKAGES>/openvino/tools/mo/front/tf/AutomlEfficientDet.py`. The json file contains some parameters which must be changed if you
|
||||
train the model yourself and modified the `hparams_config` file or the parameters are different from the ones used for EfficientDet-D4.
|
||||
The attribute names are self-explanatory or match the name in the `hparams_config` file.
|
||||
|
||||
> **NOTE**: The color channel order (RGB or BGR) of an input data should match the channel order of the model training dataset. If they are different, perform the `RGB<->BGR` conversion specifying the command-line parameter: `--reverse_input_channels`. Otherwise, inference results may be incorrect. For more information about the parameter, refer to the **When to Reverse Input Channels** section of the [Converting a Model to Intermediate Representation (IR)](@ref openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model) guide.
|
||||
|
||||
OpenVINO toolkit provides samples that can be used to infer EfficientDet model.
|
||||
@@ -73,21 +39,21 @@ For more information, refer to the [Open Model Zoo Demos](@ref omz_demos).
|
||||
## <a name="efficientdet-ir-results-interpretation"></a>Interpreting Results of the TensorFlow Model and the IR
|
||||
|
||||
The TensorFlow model produces as output a list of 7-element tuples: `[image_id, y_min, x_min, y_max, x_max, confidence, class_id]`, where:
|
||||
* `image_id` -- image batch index.
|
||||
* `y_min` -- absolute `y` coordinate of the lower left corner of the detected object.
|
||||
* `x_min` -- absolute `x` coordinate of the lower left corner of the detected object.
|
||||
* `y_max` -- absolute `y` coordinate of the upper right corner of the detected object.
|
||||
* `x_max` -- absolute `x` coordinate of the upper right corner of the detected object.
|
||||
* `confidence` -- is the confidence of the detected object.
|
||||
* `class_id` -- is the id of the detected object class counted from 1.
|
||||
* `image_id` - image batch index.
|
||||
* `y_min` - absolute `y` coordinate of the lower left corner of the detected object.
|
||||
* `x_min` - absolute `x` coordinate of the lower left corner of the detected object.
|
||||
* `y_max` - absolute `y` coordinate of the upper right corner of the detected object.
|
||||
* `x_max` - absolute `x` coordinate of the upper right corner of the detected object.
|
||||
* `confidence` - is the confidence of the detected object.
|
||||
* `class_id` - is the id of the detected object class counted from 1.
|
||||
|
||||
The output of the IR is a list of 7-element tuples: `[image_id, class_id, confidence, x_min, y_min, x_max, y_max]`, where:
|
||||
* `image_id` -- image batch index.
|
||||
* `class_id` -- is the id of the detected object class counted from 0.
|
||||
* `confidence` -- is the confidence of the detected object.
|
||||
* `x_min` -- normalized `x` coordinate of the lower left corner of the detected object.
|
||||
* `y_min` -- normalized `y` coordinate of the lower left corner of the detected object.
|
||||
* `x_max` -- normalized `x` coordinate of the upper right corner of the detected object.
|
||||
* `y_max` -- normalized `y` coordinate of the upper right corner of the detected object.
|
||||
* `image_id` - image batch index.
|
||||
* `class_id` - is the id of the detected object class counted from 0.
|
||||
* `confidence` - is the confidence of the detected object.
|
||||
* `x_min` - normalized `x` coordinate of the lower left corner of the detected object.
|
||||
* `y_min` - normalized `y` coordinate of the lower left corner of the detected object.
|
||||
* `x_max` - normalized `x` coordinate of the upper right corner of the detected object.
|
||||
* `y_max` - normalized `y` coordinate of the upper right corner of the detected object.
|
||||
|
||||
The first element with `image_id = -1` means end of data.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+571
-511
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Vendored
+45
@@ -0,0 +1,45 @@
|
||||
:root {
|
||||
--atomic-primary: rgb(var(--ost-color-navbar-background));
|
||||
--atomic-primary-light: rgb(var(--ost-color-sst-dropdown-background-active));
|
||||
--atomic-border-radius-md: 0.1rem;
|
||||
--atomic-border-radius-lg: 0.2rem;
|
||||
--atomic-border-radius-xl: 0.3rem;
|
||||
}
|
||||
|
||||
::part(result-list-grid-clickable-container) {
|
||||
border: 1px solid lightgray;
|
||||
border-radius: var(--atomic-border-radius-md);
|
||||
}
|
||||
|
||||
.view-selector-container {
|
||||
grid-area: atomic-section-facets;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
column-gap: 0.5rem;
|
||||
}
|
||||
|
||||
.view-selector-container .view-selector,
|
||||
.view-selector-container .view-selector:hover,
|
||||
.view-selector-container .view-selector:active,
|
||||
.view-selector-container .view-selector:focus {
|
||||
border: none;
|
||||
background-color: none;
|
||||
background: none;
|
||||
outline: none;
|
||||
padding: 4px 12px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
grid-gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.view-selector-container .view-selector i {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.view-selector-container .view-selector.selected {
|
||||
border-bottom: 2px solid rgb(var(--ost-color-navbar-background));
|
||||
font-weight: 700;
|
||||
color: rgb(var(--ost-color-navbar-background));
|
||||
}
|
||||
Vendored
+233
-18
@@ -10,7 +10,7 @@ main img {
|
||||
|
||||
.doxyrest-title-code-block {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
main .searchForm {
|
||||
margin-bottom: 2rem;
|
||||
@@ -23,6 +23,49 @@ pre {
|
||||
}
|
||||
|
||||
|
||||
/* cookie wap requirement */
|
||||
a#wap_dns {display: none;}
|
||||
|
||||
|
||||
/* Sphinx-design tabs override */
|
||||
.sd-tab-set>input:checked+label {
|
||||
border-color: var(--sd-color-tabs-underline-inactive);
|
||||
color: var(--sd-color-info-text)!important;
|
||||
background-color: rgb(0 104 181)!important;
|
||||
}
|
||||
|
||||
.sd-tab-set>input:checked+label:hover {
|
||||
color: --sd-color-info-text;
|
||||
background-color: rgb(0,74,134)!important;
|
||||
}
|
||||
|
||||
.sd-tab-set>input:not(:checked)+label:hover {
|
||||
color: var(--sd-color-black)!important;
|
||||
background-color: rgb(245, 245, 245)!important;
|
||||
border-color: var(--sd-color-card-header)!important;
|
||||
}
|
||||
|
||||
.sd-tab-set>label {
|
||||
border-bottom: 0.125rem solid transparent;
|
||||
margin-right: 10px!important;
|
||||
margin-bottom: 8px;
|
||||
color: var(--sd-color-black)!important;
|
||||
border-color: var(--sd-color-tabs-underline-inactive);
|
||||
cursor: pointer;
|
||||
font-size: var(--sd-fontsize-tabs-label);
|
||||
font-weight: 400!important;
|
||||
padding: 5px 16px 2px!important;
|
||||
transition: color 250ms;
|
||||
width: auto;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.sd-tab-content {
|
||||
box-shadow:none!important;
|
||||
border-top: solid 2px var(--sd-color-tabs-overline)!important;
|
||||
}
|
||||
|
||||
|
||||
/* Navigation panels override */
|
||||
/* =================================================== */
|
||||
/* Hide home item in the top bar */
|
||||
@@ -37,6 +80,7 @@ ul#navbar-main-elements li:first-of-type {
|
||||
|
||||
ul#navbar-main-elements > li:hover {
|
||||
text-decoration: underline;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +88,7 @@ ul#navbar-main-elements > li:hover {
|
||||
#bd-docs-nav > div > ul > li {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
#bd-docs-nav > div > ul > li > a {
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
@@ -66,22 +111,6 @@ ul#navbar-main-elements > li:hover {
|
||||
}
|
||||
|
||||
|
||||
/* Footer links */
|
||||
/* =================================================== */
|
||||
footer div.container div.footer-item p a {
|
||||
float: left;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
footer div.container div.footer-item p a:nth-child(1) {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
footer div.container div.footer-item p:nth-child(2) {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
/* Doc version dropdown formatting override */
|
||||
/* =================================================== */
|
||||
[aria-labelledby="version-selector"] {
|
||||
@@ -902,4 +931,190 @@ table#model-accuracy-and-perf-int8-fp32-table td.data {
|
||||
#performance-information-frequently-asked-questions section table {
|
||||
display: none;
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Newsletter */
|
||||
/* =================================================== */
|
||||
#newsletterModal {
|
||||
position: fixed;
|
||||
z-index: 5000;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(255, 255, 255, .7);
|
||||
}
|
||||
|
||||
.newsletter-shadow {
|
||||
/* background: white;
|
||||
box-shadow: 0 0 40px 40px rgba(255,255,255,1); */
|
||||
padding: 10px;
|
||||
max-width: 600px;
|
||||
width: 90%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.newsletter-box {
|
||||
max-width: 530px;
|
||||
padding: 10px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.newsletter {
|
||||
background: rgba(0, 104, 181, 1);
|
||||
box-shadow: 0 0 20px 10px #a9a9a9c0;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.newsletter-heading {
|
||||
color: white;
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
.newsletter-text {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.newsletter-input {
|
||||
box-sizing: border-box;
|
||||
border: 1px solid white;
|
||||
width: 100%;
|
||||
transition: .4s;
|
||||
line-height: 1.65rem;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.newsletter-input:focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 5px 2px white;
|
||||
}
|
||||
|
||||
.newsletter-input.failed:focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 5px 2px #a8a8a8;
|
||||
}
|
||||
|
||||
.newsletter-submit-btn,
|
||||
.newsletter-submit-btn:focus {
|
||||
background: #cdedff;
|
||||
color: rgba(0, 104, 181, 1);
|
||||
border: 0;
|
||||
position: absolute;
|
||||
top: 1.5px;
|
||||
right: 1.5px;
|
||||
padding: 0 .8rem;
|
||||
transition: .4s;
|
||||
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 31%;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.newsletter-submit-btn:hover,
|
||||
.newsletter-submit-btn:active {
|
||||
background: #00A3F6;
|
||||
color: white;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.newsletter-submit-btn:disabled {
|
||||
background: #a8a8a8;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.newsletter-submit-btn:before {
|
||||
font-family: "Font Awesome 5 Free";
|
||||
content: "\f0e0\00a0";
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.newsletter-footer-text {
|
||||
color: #76CEFF;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.newsletter-footer-text a {
|
||||
color: #B4F0FF;
|
||||
}
|
||||
|
||||
.message-box {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 1.2rem;
|
||||
text-align: center;
|
||||
display: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.newsletter-icon {
|
||||
margin-left: -31px;
|
||||
}
|
||||
|
||||
.newsletter-icon-background {
|
||||
color: white;
|
||||
top: 20px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.newsletter-submit--success {
|
||||
color: #B1D272;
|
||||
}
|
||||
|
||||
.newsletter-submit--failure {
|
||||
color: #C81326;
|
||||
}
|
||||
|
||||
.animated {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fade-up {
|
||||
animation: fade-up-anim .2s forwards;
|
||||
}
|
||||
|
||||
.fade-in {
|
||||
animation: fade-in-anim .2s forwards;
|
||||
}
|
||||
|
||||
.animation-delay {
|
||||
animation-delay: .3s;
|
||||
}
|
||||
|
||||
.animation-delay--long {
|
||||
animation-delay: .5s;
|
||||
}
|
||||
|
||||
@keyframes fade-up-anim {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fade-in-anim {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0px 1000px white inset;
|
||||
}
|
||||
|
||||
Vendored
+3
-4
@@ -5,15 +5,14 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
img {
|
||||
cursor: default;
|
||||
main img {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* === OPENVINO INTRO ================================================= */
|
||||
|
||||
.openvino-intro-text {
|
||||
|
||||
font-size: 1em;
|
||||
|
||||
}
|
||||
/* === OPENVINO DIAGRAM ================================================= */
|
||||
|
||||
|
||||
Vendored
+290
@@ -0,0 +1,290 @@
|
||||
<div class="newsletter-shadow animated fade-in">
|
||||
<div class="newsletter-box">
|
||||
<div class="newsletter">
|
||||
<span class="modal-close">×</span>
|
||||
<div class="newsletter-header">
|
||||
<h3 class="newsletter-heading">Newsletter</h3>
|
||||
<p class="newsletter-text">Be among the first to learn about everything new with the Intel® Distribution of OpenVINO™ toolkit.</p>
|
||||
</div>
|
||||
<form id="newsletterForm" class="animated fade-up animation-delay">
|
||||
<input type="hidden" name="newsletter-elqSiteID" value="334284386">
|
||||
<input type="hidden" name="newsletter-elqFormName" value="C-MKA-30146_T-MKA-36922">
|
||||
|
||||
<input type="hidden" name="newsletter-optinConsent" value="Yes">
|
||||
<input type="hidden" name="newsletter-sourceid" value="iotg_WW_iotgaiie_FMOI_EN_2023_OVDocsShadow_C-MKA-30146_T-MKA-36922">
|
||||
<input type="hidden" name="newsletter-tacticID" value="MKA-36922">
|
||||
<input type="hidden" name="newsletter-interestArea" value="IoT">
|
||||
<input type="hidden" name="newsletter-useCase" value="OpenVINO toolkit">
|
||||
<input type="hidden" name="newsletter-mediaSource" value="NA">
|
||||
<div class="form-group">
|
||||
<select id="newsletterCountry" name="newsletter-country" class="newsletter-input">
|
||||
<option value="Afghanistan">Afghanistan </option>
|
||||
<option value="Aland Islands">Aland Islands </option>
|
||||
<option value="Albania">Albania </option>
|
||||
<option value="Algeria">Algeria </option>
|
||||
<option value="American Samoa">American Samoa </option>
|
||||
<option value="Andorra">Andorra </option>
|
||||
<option value="Angola">Angola </option>
|
||||
<option value="Anguilla">Anguilla </option>
|
||||
<option value="Antarctica">Antarctica </option>
|
||||
<option value="Antigua/Barbuda">Antigua/Barbuda </option>
|
||||
<option value="Argentina">Argentina </option>
|
||||
<option value="Armenia">Armenia </option>
|
||||
<option value="Aruba">Aruba </option>
|
||||
<option value="Australia">Australia </option>
|
||||
<option value="Austria">Austria </option>
|
||||
<option value="Azerbaijan">Azerbaijan </option>
|
||||
<option value="Bahamas">Bahamas </option>
|
||||
<option value="Bahrain">Bahrain </option>
|
||||
<option value="Bangladesh">Bangladesh </option>
|
||||
<option value="Barbados">Barbados </option>
|
||||
<option value="Belarus">Belarus </option>
|
||||
<option value="Belgium">Belgium </option>
|
||||
<option value="Belize">Belize </option>
|
||||
<option value="Benin">Benin </option>
|
||||
<option value="Bermuda">Bermuda </option>
|
||||
<option value="Bhutan">Bhutan </option>
|
||||
<option value="Bolivia">Bolivia </option>
|
||||
<option value="Bonaire">Bonaire </option>
|
||||
<option value="Bosnia-Herz.">Bosnia-Herz. </option>
|
||||
<option value="Botswana">Botswana </option>
|
||||
<option value="Bouvet Islands">Bouvet Islands </option>
|
||||
<option value="Brazil">Brazil </option>
|
||||
<option value="Brit.Ind.Oc.Ter">Brit.Ind.Oc.Ter </option>
|
||||
<option value="Brit.Virgin Is.">Brit.Virgin Is. </option>
|
||||
<option value="Brunei">Brunei </option>
|
||||
<option value="Bulgaria">Bulgaria </option>
|
||||
<option value="Burkina Faso">Burkina Faso </option>
|
||||
<option value="Burundi">Burundi </option>
|
||||
<option value="C Africa Rpblic">C Africa Rpblic </option>
|
||||
<option value="Cambodia">Cambodia </option>
|
||||
<option value="Cameroon">Cameroon </option>
|
||||
<option value="Canada">Canada </option>
|
||||
<option value="Cape Verde">Cape Verde </option>
|
||||
<option value="Cayman Islands">Cayman Islands </option>
|
||||
<option value="Chad">Chad </option>
|
||||
<option value="Chile">Chile </option>
|
||||
<option value="China">China </option>
|
||||
<option value="Christmas Islnd">Christmas Islnd </option>
|
||||
<option value="Cocos Islands">Cocos Islands </option>
|
||||
<option value="Colombia">Colombia </option>
|
||||
<option value="Comoros">Comoros </option>
|
||||
<option value="Congo">Congo </option>
|
||||
<option value="Cooks Islands">Cooks Islands </option>
|
||||
<option value="Costa Rica">Costa Rica </option>
|
||||
<option value="Cote d'Ivoire">Cote d'Ivoire </option>
|
||||
<option value="Croatia">Croatia </option>
|
||||
<option value="Cuba">Cuba </option>
|
||||
<option value="Curacao">Curacao </option>
|
||||
<option value="Cyprus">Cyprus </option>
|
||||
<option value="Czechia">Czechia </option>
|
||||
<option value="Dem. Rep. Congo">Dem. Rep. Congo </option>
|
||||
<option value="Denmark">Denmark </option>
|
||||
<option value="Djibouti">Djibouti </option>
|
||||
<option value="Dominica">Dominica </option>
|
||||
<option value="Dominican Rep.">Dominican Rep. </option>
|
||||
<option value="Ecuador">Ecuador </option>
|
||||
<option value="Egypt">Egypt </option>
|
||||
<option value="El Salvador">El Salvador </option>
|
||||
<option value="Equatorial Guin">Equatorial Guin </option>
|
||||
<option value="Eritrea">Eritrea </option>
|
||||
<option value="Estonia">Estonia </option>
|
||||
<option value="Eswatini">Eswatini </option>
|
||||
<option value="Ethiopia">Ethiopia </option>
|
||||
<option value="Falkland Islnds">Falkland Islnds </option>
|
||||
<option value="Faroe Islands">Faroe Islands </option>
|
||||
<option value="Fiji">Fiji </option>
|
||||
<option value="Finland">Finland </option>
|
||||
<option value="France">France </option>
|
||||
<option value="French Guiana">French Guiana </option>
|
||||
<option value="French Poly.">French Poly. </option>
|
||||
<option value="French S. Terr.">French S. Terr. </option>
|
||||
<option value="Gabon">Gabon </option>
|
||||
<option value="Gambia">Gambia </option>
|
||||
<option value="Georgia">Georgia </option>
|
||||
<option value="Germany">Germany </option>
|
||||
<option value="Ghana">Ghana </option>
|
||||
<option value="Gibraltar">Gibraltar </option>
|
||||
<option value="Greece">Greece </option>
|
||||
<option value="Greenland">Greenland </option>
|
||||
<option value="Grenada">Grenada </option>
|
||||
<option value="Guadeloupe">Guadeloupe </option>
|
||||
<option value="Guam">Guam </option>
|
||||
<option value="Guatemala">Guatemala </option>
|
||||
<option value="Guernsey">Guernsey </option>
|
||||
<option value="Guinea">Guinea </option>
|
||||
<option value="Guinea-Bissau">Guinea-Bissau </option>
|
||||
<option value="Guyana">Guyana </option>
|
||||
<option value="Haiti">Haiti </option>
|
||||
<option value="Heard/McDon.Isl">Heard/McDon.Isl </option>
|
||||
<option value="Honduras">Honduras </option>
|
||||
<option value="Hong Kong">Hong Kong </option>
|
||||
<option value="Hungary">Hungary </option>
|
||||
<option value="Iceland">Iceland </option>
|
||||
<option value="India">India </option>
|
||||
<option value="Indonesia">Indonesia </option>
|
||||
<option value="Iran">Iran </option>
|
||||
<option value="Iraq">Iraq </option>
|
||||
<option value="Ireland">Ireland </option>
|
||||
<option value="Isle of Man">Isle of Man </option>
|
||||
<option value="Israel">Israel </option>
|
||||
<option value="Italy">Italy </option>
|
||||
<option value="Jamaica">Jamaica </option>
|
||||
<option value="Japan">Japan </option>
|
||||
<option value="Jersey">Jersey </option>
|
||||
<option value="Jordan">Jordan </option>
|
||||
<option value="Kazakhstan">Kazakhstan </option>
|
||||
<option value="Kenya">Kenya </option>
|
||||
<option value="Kiribati">Kiribati </option>
|
||||
<option value="Kuwait">Kuwait </option>
|
||||
<option value="Kyrgyzstan">Kyrgyzstan </option>
|
||||
<option value="Laos">Laos </option>
|
||||
<option value="Latvia">Latvia </option>
|
||||
<option value="Lebanon">Lebanon </option>
|
||||
<option value="Lesotho">Lesotho </option>
|
||||
<option value="Liberia">Liberia </option>
|
||||
<option value="Libya">Libya </option>
|
||||
<option value="Liechtenstein">Liechtenstein </option>
|
||||
<option value="Lithuania">Lithuania </option>
|
||||
<option value="Luxembourg">Luxembourg </option>
|
||||
<option value="Macao SAR China">Macao SAR China </option>
|
||||
<option value="Macedonia">Macedonia </option>
|
||||
<option value="Madagascar">Madagascar </option>
|
||||
<option value="Malawi">Malawi </option>
|
||||
<option value="Malaysia">Malaysia </option>
|
||||
<option value="Maldives">Maldives </option>
|
||||
<option value="Mali">Mali </option>
|
||||
<option value="Malta">Malta </option>
|
||||
<option value="Marshall Islnds">Marshall Islnds </option>
|
||||
<option value="Martinique">Martinique </option>
|
||||
<option value="Mauritania">Mauritania </option>
|
||||
<option value="Mauritius">Mauritius </option>
|
||||
<option value="Mayotte">Mayotte </option>
|
||||
<option value="Mexico">Mexico </option>
|
||||
<option value="Micronesia">Micronesia </option>
|
||||
<option value="Minor Outl.Isl.">Minor Outl.Isl. </option>
|
||||
<option value="Moldova">Moldova </option>
|
||||
<option value="Monaco">Monaco </option>
|
||||
<option value="Mongolia">Mongolia </option>
|
||||
<option value="Montenegro">Montenegro </option>
|
||||
<option value="Montserrat">Montserrat </option>
|
||||
<option value="Morocco">Morocco </option>
|
||||
<option value="Mozambique">Mozambique </option>
|
||||
<option value="Myanmar">Myanmar </option>
|
||||
<option value="N.Mariana Islnd">N.Mariana Islnd </option>
|
||||
<option value="Namibia">Namibia </option>
|
||||
<option value="Nauru">Nauru </option>
|
||||
<option value="Nepal">Nepal </option>
|
||||
<option value="Netherlands">Netherlands </option>
|
||||
<option value="New Caledonia">New Caledonia </option>
|
||||
<option value="New Zealand">New Zealand </option>
|
||||
<option value="Nicaragua">Nicaragua </option>
|
||||
<option value="Niger">Niger </option>
|
||||
<option value="Nigeria">Nigeria </option>
|
||||
<option value="Niue">Niue </option>
|
||||
<option value="Norfolk Islands">Norfolk Islands </option>
|
||||
<option value="North Korea">North Korea </option>
|
||||
<option value="Norway">Norway </option>
|
||||
<option value="Oman">Oman </option>
|
||||
<option value="Pakistan">Pakistan </option>
|
||||
<option value="Palau">Palau </option>
|
||||
<option value="Palestine, State">Palestine, State </option>
|
||||
<option value="Panama">Panama </option>
|
||||
<option value="Pap. New Guinea">Pap. New Guinea </option>
|
||||
<option value="Paraguay">Paraguay </option>
|
||||
<option value="Peru">Peru </option>
|
||||
<option value="Philippines">Philippines </option>
|
||||
<option value="Pitcairn">Pitcairn </option>
|
||||
<option value="Poland">Poland </option>
|
||||
<option value="Portugal">Portugal </option>
|
||||
<option value="Puerto Rico">Puerto Rico </option>
|
||||
<option value="Qatar">Qatar </option>
|
||||
<option value="Reunion">Reunion </option>
|
||||
<option value="Romania">Romania </option>
|
||||
<option value="Russian Fed">Russian Fed </option>
|
||||
<option value="Rwanda">Rwanda </option>
|
||||
<option value="S. Sandwich Ins">S. Sandwich Ins </option>
|
||||
<option value="S.Tome,Principe">S.Tome,Principe </option>
|
||||
<option value="Saint Helena">Saint Helena </option>
|
||||
<option value="Saint Lucia">Saint Lucia </option>
|
||||
<option value="Saint Martin">Saint Martin </option>
|
||||
<option value="Saint Pierre">Saint Pierre </option>
|
||||
<option value="Samoa">Samoa </option>
|
||||
<option value="San Marino">San Marino </option>
|
||||
<option value="Saudi Arabia">Saudi Arabia </option>
|
||||
<option value="Senegal">Senegal </option>
|
||||
<option value="Serbia">Serbia </option>
|
||||
<option value="Seychelles">Seychelles </option>
|
||||
<option value="Sierra Leone">Sierra Leone </option>
|
||||
<option value="Singapore">Singapore </option>
|
||||
<option value="Sint Maarten">Sint Maarten </option>
|
||||
<option value="Slovakia">Slovakia </option>
|
||||
<option value="Slovenia">Slovenia </option>
|
||||
<option value="Solomon Islands">Solomon Islands </option>
|
||||
<option value="Somalia">Somalia </option>
|
||||
<option value="South Africa">South Africa </option>
|
||||
<option value="South Korea">South Korea </option>
|
||||
<option value="South Sudan">South Sudan </option>
|
||||
<option value="Spain">Spain </option>
|
||||
<option value="Sri Lanka">Sri Lanka </option>
|
||||
<option value="St Kitts&Nevis">St Kitts&Nevis </option>
|
||||
<option value="St. Barthelemy">St. Barthelemy </option>
|
||||
<option value="St. Vincent">St. Vincent </option>
|
||||
<option value="Sudan">Sudan </option>
|
||||
<option value="Suriname">Suriname </option>
|
||||
<option value="Svalbard & JM">Svalbard & JM </option>
|
||||
<option value="Sweden">Sweden </option>
|
||||
<option value="Switzerland">Switzerland </option>
|
||||
<option value="Syria">Syria </option>
|
||||
<option value="Taiwan">Taiwan </option>
|
||||
<option value="Tajikistan">Tajikistan </option>
|
||||
<option value="Tanzania">Tanzania </option>
|
||||
<option value="Thailand">Thailand </option>
|
||||
<option value="Timor-Leste">Timor-Leste </option>
|
||||
<option value="Togo">Togo </option>
|
||||
<option value="Tokelau">Tokelau </option>
|
||||
<option value="Tonga">Tonga </option>
|
||||
<option value="Trinidad,Tobago">Trinidad,Tobago </option>
|
||||
<option value="Tunisia">Tunisia </option>
|
||||
<option value="Turkey">Turkey </option>
|
||||
<option value="Turkmenistan">Turkmenistan </option>
|
||||
<option value="Turksh Caicosin">Turksh Caicosin </option>
|
||||
<option value="Tuvalu">Tuvalu </option>
|
||||
<option value="Uganda">Uganda </option>
|
||||
<option value="Ukraine">Ukraine </option>
|
||||
<option value="United Kingdom">United Kingdom </option>
|
||||
<option value="United States" selected>United States </option>
|
||||
<option value="Uruguay">Uruguay </option>
|
||||
<option value="Utd.Arab Emir.">Utd.Arab Emir. </option>
|
||||
<option value="Uzbekistan">Uzbekistan </option>
|
||||
<option value="Vanuatu">Vanuatu </option>
|
||||
<option value="Vatican City">Vatican City </option>
|
||||
<option value="Venezuela">Venezuela </option>
|
||||
<option value="Vietnam">Vietnam </option>
|
||||
<option value="Virgin Islands">Virgin Islands </option>
|
||||
<option value="Wallis & Futuna">Wallis & Futuna </option>
|
||||
<option value="Western Sahara">Western Sahara </option>
|
||||
<option value="Yemen">Yemen </option>
|
||||
<option value="Zambia">Zambia </option>
|
||||
<option value="Zimbabwe">Zimbabwe </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="newsletter-input" name="newsletter-emailAddress" id="newsletterEmail" placeholder="Enter your email" required>
|
||||
<button class="newsletter-submit-btn" type="submit">SUBMIT </button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="message-box" id="loader">
|
||||
<svg version="1.1" id="loader" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve" style="width: 100px; height: 100px">
|
||||
<path fill="#a8a8a8" fill-opacity="0.4" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
|
||||
<animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="1s" from="0 50 50" to="360 50 50" repeatCount="indefinite" />
|
||||
</path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="message-box animated fade-up" id="message"></div>
|
||||
<div class="newsletter-footer animated fade-in animation-delay--long">
|
||||
<p class="newsletter-footer-text">By submitting this form, you are confirming you are an adult 18 years or older and you agree to share your personal information with Intel to use for this business request. You also agree to subscribe to stay connected to the latest Intel technologies and industry trends by email and telephone. You may unsubscribe at any time. Intel's web sites and communications are subject to our <a href="https://intel.com/content/www/us/en/privacy/intel-privacy-notice.html" target="_blank"> Privacy Notice </a> and <a href="https://intel.com/content/www/us/en/legal/terms-of-use.html" target="_blank"> Terms of Use.</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Vendored
+65
@@ -34,6 +34,7 @@ function addLegalNotice() {
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
addFooter();
|
||||
createVersions();
|
||||
updateTitleTag();
|
||||
updateLanguageSelector();
|
||||
@@ -326,3 +327,67 @@ function initBenchmarkPickers() {
|
||||
$('#performance-information-frequently-asked-questions section p, #performance-information-frequently-asked-questions section table').hide();
|
||||
}
|
||||
}
|
||||
|
||||
function addFooter() {
|
||||
const footerAnchor = $('.footer');
|
||||
|
||||
fetch('/footer.html').then((response) => response.text()).then((text) => {
|
||||
const footerContent = $(text);
|
||||
footerAnchor.append(footerContent);
|
||||
});
|
||||
}
|
||||
|
||||
// ---------- COVEO SEARCH -----------
|
||||
function selectResultViewType(type, gridButton, listButton) {
|
||||
type === "grid" ? gridButton.click() : listButton.click();
|
||||
}
|
||||
|
||||
function addViewTypeListeners() {
|
||||
const resultViewTypeFromLs = window.localStorage.getItem('atomicResultViewType');
|
||||
let list = document.getElementById("atomic-result-list");
|
||||
var viewSelectorGrid = document.getElementById("view-selector-grid");
|
||||
viewSelectorGrid.addEventListener('click', function () {
|
||||
list.display = "grid";
|
||||
window.localStorage.setItem('atomicResultViewType', "grid");
|
||||
viewSelectorGrid.classList.add('selected');
|
||||
viewSelectorList.classList.remove('selected');
|
||||
selectResultViewType("grid", viewSelectorGrid, viewSelectorList);
|
||||
});
|
||||
var viewSelectorList = document.getElementById("view-selector-list");
|
||||
viewSelectorList.addEventListener('click', function () {
|
||||
list.display = "list";
|
||||
window.localStorage.setItem('atomicResultViewType', "list");
|
||||
viewSelectorList.classList.add('selected');
|
||||
viewSelectorGrid.classList.remove('selected');
|
||||
selectResultViewType("list", viewSelectorGrid, viewSelectorList);
|
||||
});
|
||||
selectResultViewType(resultViewTypeFromLs || "grid", viewSelectorGrid, viewSelectorList);
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
(async () => {
|
||||
await customElements.whenDefined("atomic-search-interface");
|
||||
const searchInterfaceSa = document.querySelector("#sa-search");
|
||||
const searchInterface = document.querySelector("#search");
|
||||
if (searchInterfaceSa) {
|
||||
let ver = getCurrentVersion();
|
||||
if (ver) {
|
||||
searchInterfaceSa.innerHTML = searchInterfaceSa.innerHTML.replace('search.html', '/' + ver +'/search.html#f-ovversion=' + ver);
|
||||
}
|
||||
await searchInterfaceSa.initialize({
|
||||
accessToken: "xx1f2aebd3-4307-4632-aeea-17c13378b237",
|
||||
organizationId: "intelcorporationnonproduction2ybdyblf7",
|
||||
});
|
||||
searchInterfaceSa.executeFirstSearch();
|
||||
}
|
||||
if (searchInterface) {
|
||||
await searchInterface.initialize({
|
||||
accessToken: "xx1f2aebd3-4307-4632-aeea-17c13378b237",
|
||||
organizationId: "intelcorporationnonproduction2ybdyblf7",
|
||||
});
|
||||
searchInterface.executeFirstSearch();
|
||||
}
|
||||
addViewTypeListeners();
|
||||
})();
|
||||
})
|
||||
// -----------------------------------
|
||||
|
||||
Vendored
+2
-8
@@ -154,11 +154,8 @@ function addVersionTabs(selectedVersion, query) {
|
||||
var tab_versions = [{'version': 'ALL'}];
|
||||
var latestVersion;
|
||||
if (versions.length) {
|
||||
tab_versions = [{'version': 'ALL'}].concat(versions.slice(1));
|
||||
latestVersion = tab_versions[2].version;
|
||||
if (selectedVersion === 'latest') {
|
||||
selectedVersion = versions[2].version;
|
||||
}
|
||||
tab_versions = [{'version': 'ALL'}].concat(versions.slice(0, -1));
|
||||
latestVersion = tab_versions[1].version;
|
||||
}
|
||||
for (var i = 0; i < tab_versions.length; i++) {
|
||||
var href;
|
||||
@@ -351,9 +348,6 @@ $(document).ready(function() {
|
||||
var page = trim(getURLParameter('page')) || 1;
|
||||
var selectedVersion = trim(getURLParameter('version'));
|
||||
if (versionExists(selectedVersion)) {
|
||||
if (versions[1] && selectedVersion === versions[1].version) {
|
||||
selectedVersion = 'latest';
|
||||
}
|
||||
if (window.location.pathname.startsWith('/cn')) {
|
||||
selectedVersion = 'cn/' + selectedVersion;
|
||||
}
|
||||
|
||||
Vendored
+142
@@ -0,0 +1,142 @@
|
||||
const eloquaUrl = 'https://s334284386.t.eloqua.com/e/f2'
|
||||
newsletterFieldPrefix = 'newsletter-'
|
||||
|
||||
// debug url
|
||||
// const eloquaUrl = 'https://httpbingo.org/post'
|
||||
|
||||
const currentPath = window.location.pathname.slice(1).split('/');
|
||||
const newsletterModalPathVersion = (['cn', 'jp'].includes(currentPath[0])) ?
|
||||
`/${currentPath[0]}/${currentPath[1]}` :
|
||||
`/${currentPath[0]}`;
|
||||
const newsletterModalPath = newsletterModalPathVersion + '/_static/html/newsletter.html';
|
||||
|
||||
$(document).ready(function () {
|
||||
const waitForElement = async selector => {
|
||||
while (document.querySelector(selector) === null) {
|
||||
await new Promise(resolve => requestAnimationFrame(resolve))
|
||||
}
|
||||
return document.querySelector(selector);
|
||||
};
|
||||
|
||||
waitForElement('#newsletterTrigger').then((trigger) => {
|
||||
$(trigger).on('click', showForm);
|
||||
})
|
||||
|
||||
// trigger with iframe
|
||||
// $('iframe').on('load', function() {
|
||||
// $('iframe').contents().find('#newsletterTrigger').on('click', showForm);
|
||||
// });
|
||||
|
||||
function showForm() {
|
||||
fetch(newsletterModalPath).then((response) => response.text()).then((text) => {
|
||||
const newsletter = $('<div>');
|
||||
newsletter.attr('id', 'newsletterModal');
|
||||
newsletter.addClass('newsletterContainer');
|
||||
|
||||
const newsletterContent = $(text);
|
||||
newsletter.append(newsletterContent);
|
||||
$('body').prepend(newsletter);
|
||||
|
||||
$('#newsletterEmail').focus();
|
||||
|
||||
$('.modal-close').on('click', closeForm);
|
||||
$('#newsletterEmail').on('keyup', validate);
|
||||
|
||||
$("#newsletterForm").submit(function(event) {
|
||||
event.preventDefault();
|
||||
const formHeight = $(this).outerHeight()
|
||||
$(this).removeClass('animated fade-up')
|
||||
$(this).animate({opacity: 0}, 200, 'linear', () => {
|
||||
|
||||
$(this).hide()
|
||||
const loader = $('#loader');
|
||||
loader.css({'height': formHeight + 16, 'display': 'flex'});
|
||||
|
||||
const currentUrl = window.location.protocol + '//' + window.location.hostname + window.location.pathname
|
||||
$(this).append(`<input type="hidden" name="newsletter-pageSource" value="${currentUrl}">`)
|
||||
const rawFormData = $(this).serializeArray()
|
||||
const filteredFormData = [];
|
||||
for (var entry of rawFormData) {
|
||||
if (entry['name'].startsWith(newsletterFieldPrefix)) {
|
||||
entry['name'] = entry['name'].replace(newsletterFieldPrefix, '');
|
||||
filteredFormData.push(entry)
|
||||
}
|
||||
}
|
||||
$.post(eloquaUrl, $.param(filteredFormData))
|
||||
.done(function(data) {
|
||||
// ---------- debug request data
|
||||
|
||||
// console.log('#############');
|
||||
// console.log('Origin: ' + data.headers['Origin'][0]);
|
||||
// console.log('Url: ' + data.url);
|
||||
// console.log('Form data:');
|
||||
// for (key in data.form) {
|
||||
// console.log(`-- ${key}: ${data.form[key]}`);
|
||||
// }
|
||||
|
||||
// ----------
|
||||
displayMessage(formHeight, 'pass');
|
||||
})
|
||||
.fail(function(error) {
|
||||
displayMessage(formHeight, 'error', error.status);
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function closeForm() {
|
||||
$('#newsletterModal').animate({opacity: 0}, 200, 'linear', function() {
|
||||
this.remove();
|
||||
});
|
||||
}
|
||||
|
||||
function validate() {
|
||||
let value = $('#newsletterEmail').val();
|
||||
const emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
|
||||
if (emailPattern.test(value)) {
|
||||
$('#newsletterEmail').removeClass('failed');
|
||||
$('.newsletter-submit-btn').prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
$('#newsletterEmail').addClass('failed');
|
||||
$('.newsletter-submit-btn').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
function displayMessage(boxHeight, status, errorCode) {
|
||||
$('#loader').hide();
|
||||
let message = '';
|
||||
const messageBox = $('#message');
|
||||
const icon = $('<div class="fa-stack fa-2x newsletter-icon">');
|
||||
const iconBackground = $('<i class="fas fa-square fa-stack-2x newsletter-icon-background">');
|
||||
const iconMain = $('<i class="fas fa-stack-1x">');
|
||||
icon.append(iconBackground);
|
||||
icon.append(iconMain);
|
||||
messageBox.css({'height': boxHeight + 16, 'display': 'flex'});
|
||||
|
||||
switch(status) {
|
||||
case 'pass':
|
||||
iconMain.addClass('fa-check-square');
|
||||
messageBox.addClass('newsletter-submit--success')
|
||||
message = 'REGISTRATION SUCCESSFUL'
|
||||
break;
|
||||
case 'error':
|
||||
iconMain.addClass('fa-window-close');
|
||||
iconMain.addClass('newsletter-submit--failure')
|
||||
switch(errorCode) {
|
||||
case 400:
|
||||
message = 'ALREADY REGISTERED';
|
||||
break;
|
||||
default:
|
||||
message = 'REGISTRATION FAILED';
|
||||
break;
|
||||
}
|
||||
}
|
||||
window.setTimeout(() => {
|
||||
messageBox.append(icon);
|
||||
messageBox.append(message);
|
||||
});
|
||||
window.setTimeout(closeForm, 1500);
|
||||
}
|
||||
});
|
||||
Vendored
+4
@@ -2,8 +2,12 @@
|
||||
|
||||
{% block css %}
|
||||
{{ super() }}
|
||||
<script type="module" src="https://static.cloud.coveo.com/atomic/v2/atomic.esm.js"></script>
|
||||
<link rel="stylesheet" href="https://static.cloud.coveo.com/atomic/v2/themes/coveo.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/viewer.min.css', 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/custom.css', 1) }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/coveo_custom.css', 1) }}" type="text/css" />
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
|
||||
|
||||
Vendored
+6
-4
@@ -1,4 +1,6 @@
|
||||
<form class="searchForm bd-search d-flex align-items-center" action="{{ pathto('search') }}" method="get">
|
||||
<i class="icon fas fa-search"></i>
|
||||
<input type="search" class="form-control" name="query" id="search-input" placeholder="{{ _(theme_search_bar_text) }}" aria-label="{{ theme_search_bar_text }}" autocomplete="off" >
|
||||
</form>
|
||||
<div>
|
||||
<atomic-search-interface id="sa-search">
|
||||
<atomic-search-box redirection-url="search.html">
|
||||
</atomic-search-box>
|
||||
</atomic-search-interface>
|
||||
</div>
|
||||
|
||||
Vendored
+139
-27
@@ -1,31 +1,143 @@
|
||||
{%- extends "layout.html" %}
|
||||
{% set title = _('Search') %}
|
||||
{%- block scripts %}
|
||||
|
||||
{%- block content %}
|
||||
{# Added to support a banner with an alert #}
|
||||
<div class="container-fluid" id="banner"></div>
|
||||
|
||||
{% block docs_navbar %}
|
||||
{{ super() }}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/css/gsearch.css', 1) }}" type="text/css" />
|
||||
<script src="https://apis.google.com/js/api.js"></script>
|
||||
<script src="{{ pathto('_static/js/gsearch.js', 1) }}"></script>
|
||||
<div id="info-banner" class="transition-banner">
|
||||
<p>OpenVINO 2022.1 has introduced OpenVINO API 2.0. For more information on transition steps from the previous API, see the <a href="https://docs.openvino.ai/latest/openvino_2_0_transition_guide.html">transition guide</a></p>
|
||||
<button type="button" class="close-banner" onclick="closeTransitionBanner()">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<script src="{{ pathto('_static/js/hide_banner.js', 1) }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<atomic-search-interface id="search"
|
||||
fields-to-include='["ovversion", "ovdoctype", "filetype", "date", "source", "author", "sourcetype", "language", "description"]'>
|
||||
<atomic-search-layout>
|
||||
|
||||
<atomic-layout-section section="search">
|
||||
<atomic-search-box>
|
||||
<atomic-search-box-query-suggestions></atomic-search-box-query-suggestions>
|
||||
</atomic-search-box>
|
||||
</atomic-layout-section>
|
||||
|
||||
<!-- ADDITIONAL FILTERS SECTION-->
|
||||
<atomic-layout-section section="facets">
|
||||
<div class="view-selector-container">
|
||||
<button id="view-selector-grid" class="view-selector">
|
||||
<i class="fas fa-th"></i> Grid
|
||||
</button>
|
||||
<button id="view-selector-list" class="view-selector">
|
||||
<i class="fas fa-list"></i> List
|
||||
</button>
|
||||
</div>
|
||||
<atomic-facet-manager>
|
||||
<atomic-facet field="ovversion" label="Version" sort-criteria="alphanumericDescending"></atomic-facet>
|
||||
<!-- <atomic-facet field="ovdoctype" label="Document type"></atomic-facet> -->
|
||||
<!-- <atomic-facet field="language" label="Language"></atomic-facet> -->
|
||||
</atomic-facet-manager>
|
||||
</atomic-layout-section>
|
||||
|
||||
<atomic-layout-section section="main">
|
||||
|
||||
<atomic-layout-section section="status">
|
||||
<!-- RESULTS SUMMARY SECTION -->
|
||||
<atomic-breadbox></atomic-breadbox>
|
||||
<atomic-query-summary></atomic-query-summary>
|
||||
<atomic-refine-toggle></atomic-refine-toggle>
|
||||
|
||||
<!-- SORT SECTION -->
|
||||
<atomic-sort-dropdown>
|
||||
<atomic-sort-expression label="relevance" expression="relevancy"></atomic-sort-expression>
|
||||
<atomic-sort-expression label="most-recent" expression="date descending"></atomic-sort-expression>
|
||||
</atomic-sort-dropdown>
|
||||
|
||||
<atomic-did-you-mean></atomic-did-you-mean>
|
||||
<atomic-notifications></atomic-notifications>
|
||||
|
||||
</atomic-layout-section>
|
||||
|
||||
<atomic-layout-section section="results">
|
||||
|
||||
<atomic-result-list id="atomic-result-list" display="grid">
|
||||
|
||||
<atomic-result-template>
|
||||
<template>
|
||||
<!-- RESULT TOP BADGES SECTION -->
|
||||
<atomic-result-section-badges>
|
||||
<atomic-result-badge>
|
||||
<atomic-result-multi-value-text field="ovversion"></atomic-result-multi-value-text>
|
||||
</atomic-result-badge>
|
||||
|
||||
<atomic-result-badge
|
||||
icon="https://raw.githubusercontent.com/Rush/Font-Awesome-SVG-PNG/master/black/svg/language.svg">
|
||||
<atomic-result-multi-value-text field="language"></atomic-result-multi-value-text>
|
||||
</atomic-result-badge>
|
||||
|
||||
<atomic-field-condition must-match-is-recommendation="true">
|
||||
<atomic-result-badge label="Recommended"></atomic-result-badge>
|
||||
</atomic-field-condition>
|
||||
|
||||
<atomic-field-condition must-match-is-top-result="true">
|
||||
<atomic-result-badge label="Top Result"></atomic-result-badge>
|
||||
</atomic-field-condition>
|
||||
</atomic-result-section-badges>
|
||||
|
||||
<!-- RESULT ICON SECTION -->
|
||||
<atomic-result-section-visual>
|
||||
<atomic-icon class="icon" icon="assets://gform.svg"></atomic-result-icon>
|
||||
<!-- EXAMPLE OF CHANGING ICON -->
|
||||
<!-- <atomic-field-condition must-match-ovversion="2021.4">
|
||||
<atomic-icon class="icon" icon="assets://gsheet.svg"></atomic-icon>
|
||||
</atomic-field-condition>
|
||||
<atomic-field-condition must-match-ovversion="2022.2">
|
||||
<atomic-icon class="icon" icon="assets://html.svg"></atomic-icon>
|
||||
</atomic-field-condition>
|
||||
<atomic-field-condition must-not-match-ovversion="2022.2, 2021.4">
|
||||
<atomic-icon class="icon" icon="assets://gform.svg"></atomic-icon>
|
||||
</atomic-field-condition> -->
|
||||
</atomic-result-section-visual>
|
||||
|
||||
<atomic-result-section-title>
|
||||
<atomic-result-link target="_blank"></atomic-result-link>
|
||||
</atomic-result-section-title>
|
||||
|
||||
<atomic-result-section-excerpt>
|
||||
<atomic-result-text field="excerpt"></atomic-result-text>
|
||||
</atomic-result-section-excerpt>
|
||||
|
||||
<atomic-result-section-bottom-metadata>
|
||||
<atomic-field-condition class="field" if-defined="description">
|
||||
<atomic-result-text field="description"></atomic-result-text>
|
||||
</atomic-field-condition>
|
||||
</atomic-result-section-bottom-metadata>
|
||||
</template>
|
||||
</atomic-result-template>
|
||||
|
||||
</atomic-result-list>
|
||||
|
||||
<atomic-query-error></atomic-query-error>
|
||||
<atomic-no-results></atomic-no-results>
|
||||
|
||||
</atomic-layout-section>
|
||||
|
||||
<atomic-layout-section section="pagination">
|
||||
<atomic-load-more-results></atomic-load-more-results>
|
||||
</atomic-layout-section>
|
||||
|
||||
</atomic-layout-section>
|
||||
</atomic-search-layout>
|
||||
</atomic-search-interface>
|
||||
{% endblock %}
|
||||
|
||||
{%- block scripts_end %}
|
||||
{{ _webpack.body_post() }}
|
||||
{%- endblock %}
|
||||
|
||||
{%- endblock %}
|
||||
{% block body %}
|
||||
<h1 id="search-documentation">{{ _('Search') }}</h1>
|
||||
<p id="searchinfo">
|
||||
Search Results...
|
||||
</p>
|
||||
<div id="gs-tabs-area"></div>
|
||||
{% block scriptwarning %}
|
||||
<div id="fallback" class="admonition warning">
|
||||
<script>$('#fallback').hide();</script>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block searchbox %}
|
||||
<form class="searchForm" action="" method="get">
|
||||
<input id="searchfield" type="text" name="query" aria-labelledby="search-documentation" value="" />
|
||||
<input type="submit" value="{{ _('search') }}" />
|
||||
<span id="search-progress" style="padding-left: 10px"></span>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{% block searchresults %}
|
||||
<div id="gs-tabs-area"></div>
|
||||
<div id="searchresults"></div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
+23
-3
@@ -28,6 +28,7 @@ copyright = '2022, Intel®'
|
||||
author = 'Intel®'
|
||||
|
||||
language = 'en'
|
||||
version_name = '2022.3'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@@ -43,12 +44,31 @@ extensions = [
|
||||
'cpplexer',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
'sphinx_sitemap'
|
||||
'openvino_custom_sphinx_sitemap'
|
||||
]
|
||||
|
||||
html_baseurl = 'https://docs.openvino.ai/latest/'
|
||||
html_baseurl = 'https://docs.openvino.ai/canonical/'
|
||||
|
||||
# -- Sitemap configuration ---------------------------
|
||||
|
||||
sitemap_url_scheme = "{link}"
|
||||
site_url = f'https://docs.openvino.ai/{version_name}/'
|
||||
|
||||
ov_sitemap_urlset = [
|
||||
("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9"),
|
||||
("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"),
|
||||
("xmlns:coveo", "https://www.coveo.com/en/company/about-us"),
|
||||
("xsi:schemaLocation", "http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd")
|
||||
]
|
||||
|
||||
ov_sitemap_meta = [
|
||||
('coveo:metadata', {
|
||||
'ovversion': version_name,
|
||||
})
|
||||
]
|
||||
|
||||
# ----------------------------------------------------
|
||||
|
||||
|
||||
html_favicon = '_static/favicon.ico'
|
||||
autodoc_default_flags = ['members']
|
||||
@@ -181,6 +201,6 @@ def setup(app):
|
||||
app.connect('build-finished',replace_index_with_redirect)
|
||||
app.add_js_file('js/custom.js')
|
||||
app.add_js_file('js/graphs.js')
|
||||
app.add_js_file('js/newsletter.js')
|
||||
app.add_js_file('js/graphs_ov_tf.js')
|
||||
app.add_js_file('js/open_sidebar.js')
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ OpenVINO™ Documentation
|
||||
Install <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html>
|
||||
Blog <https://blog.openvino.ai/>
|
||||
Forum <https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/bd-p/distribution-openvino-toolkit>
|
||||
Training <https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/learn/certification.html>
|
||||
Support <https://www.intel.com/content/www/us/en/support/products/96066/software/development-software/openvino-toolkit.html>
|
||||
GitHub <https://github.com/openvinotoolkit>
|
||||
|
||||
@@ -5,70 +5,111 @@
|
||||
|
||||
.. _gpu guide:
|
||||
|
||||
@endsphinxdirective
|
||||
To use the OpenVINO™ GPU plug-in and transfer the inference to the graphics of the Intel® processor (GPU), the Intel® graphics driver must be properly configured on the system.
|
||||
|
||||
In case if you are intended to use OpenVINO GPU plugin and offload network inference to Intel® graphics processor, the Intel Graphics Driver should be properly configured on your system.
|
||||
Linux
|
||||
##########
|
||||
|
||||
If it is already installed, and you want to keep it, you can skip the installation steps.
|
||||
To use a GPU device for OpenVINO inference, you must install OpenCL runtime packages.
|
||||
|
||||
## Linux
|
||||
If you are using a discrete GPU (for example Arc 770), you must also be using a supported Linux kernel as per `documentation. <https://dgpu-docs.intel.com/driver/kernel-driver-types.html>`__
|
||||
|
||||
To install the latest available **Intel® Graphics Compute Runtime for OpenCL™** for your OS, see the [Install Guides](https://github.com/intel/compute-runtime/releases/latest).
|
||||
- For Arc GPU, kernel 6.2 or higher is recommended.
|
||||
- For Max and Flex GPU, or Arc with kernel version lower than 6.2, you must also install the ``intel-i915-dkms`` and ``xpu-smi`` kernel modules as described in the installation documentation for `Max/Flex <https://dgpu-docs.intel.com/driver/installation.html>`__ or `Arc. <https://dgpu-docs.intel.com/driver/client/overview.html>`__
|
||||
|
||||
@sphinxdirective
|
||||
Below are the instructions on how to install the OpenCL packages on supported Linux distributions. These instructions install the `Intel(R) Graphics Compute Runtime for oneAPI Level Zero and OpenCL(TM) Driver <https://github.com/intel/compute-runtime/releases/tag/23.22.26516.18>`__ and its dependencies:
|
||||
|
||||
.. note::
|
||||
If you use RedHat 8 OS please install OpenCL library as prerequisite via following command line: ``sh rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm``
|
||||
- `Intel Graphics Memory Management Library <https://github.com/intel/gmmlib>`__
|
||||
- `Intel® Graphics Compiler for OpenCL™ <https://github.com/intel/intel-graphics-compiler>`__
|
||||
- `OpenCL ICD loader package <https://github.com/KhronosGroup/OpenCL-ICD-Loader>`__
|
||||
|
||||
.. note::
|
||||
For instructions specific to discrete graphics platforms, refer to `the dgpu guide <https://dgpu-docs.intel.com/installation-guides/index.html>`__ (Intel® Arc™ A-Series Graphics, Intel® Data Center GPU Flex Series, Intel® Data Center GPU MAX Series, Intel® processor graphics Gen12, and Intel® Iris Xe MAX codename DG1).
|
||||
.. tab-set::
|
||||
|
||||
@endsphinxdirective
|
||||
.. tab-item:: Ubuntu 22.04 LTS
|
||||
:sync: ubuntu-22
|
||||
|
||||
You may consider installing one of the earlier versions of the driver, based on your particular setup needs.
|
||||
Download and install the `deb` packages published `here <https://github.com/intel/compute-runtime/releases/latest>`__ and install the apt package `ocl-icd-libopencl1` with the OpenCl ICD loader.
|
||||
|
||||
Alternatively, you can add the apt repository by following the `installation guide <https://dgpu-docs.intel.com/driver/installation.html#ubuntu-install-steps>`__. Then install the `ocl-icd-libopencl1`, `intel-opencl-icd`, `intel-level-zero-gpu` and `level-zero` apt packages:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
apt-get install -y ocl-icd-libopencl1 intel-opencl-icd intel-level-zero-gpu level-zero
|
||||
|
||||
It is recommended that you refer to the [Intel® Graphics Compute Runtime Github page](https://github.com/intel/compute-runtime/) for instructions and recommendations on GPU driver installation specific to particular releases, including the list of supported hardware platforms.
|
||||
.. tab-item:: Ubuntu 20.04 LTS
|
||||
:sync: ubuntu-20
|
||||
|
||||
Ubuntu 20.04 LTS is not updated with the latest driver versions. You can install the updated versions up to the version 22.43 from apt:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
apt-get update && apt-get install -y --no-install-recommends curl gpg gpg-agent && \
|
||||
curl https://repositories.intel.com/graphics/intel-graphics.key | gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg && \
|
||||
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu focal-legacy main' | tee /etc/apt/sources.list.d/intel.gpu.focal.list && \
|
||||
apt-get update
|
||||
apt-get update && apt-get install -y --no-install-recommends intel-opencl-icd intel-level-zero-gpu level-zero
|
||||
|
||||
Alternatively, download older `deb` version from `here <https://github.com/intel/compute-runtime/releases>`__. Note that older driver version might not include some of the bug fixes and might be not supported on some latest platforms. Check the supported hardware for the versions you are installing.
|
||||
|
||||
@sphinxdirective
|
||||
.. tab-item:: RedHat UBI 8
|
||||
:sync: redhat-8
|
||||
|
||||
Follow the `guide <https://dgpu-docs.intel.com/driver/installation.html#rhel-install-steps>`__ to add Yum repository.
|
||||
|
||||
Install following packages:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
yum install intel-opencl level-zero intel-level-zero-gpu intel-igc-core intel-igc-cm intel-gmmlib intel-ocloc
|
||||
|
||||
Install the OpenCL ICD Loader via:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
rpm -ivh http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/ocl-icd-2.2.12-1.el8.x86_64.rpm
|
||||
|
||||
.. _gpu guide windows:
|
||||
|
||||
@endsphinxdirective
|
||||
Windows
|
||||
##########
|
||||
|
||||
## Windows
|
||||
|
||||
To install the Intel Graphics Driver for Windows on your hardware, please proceed with the [instruction](https://www.intel.com/content/www/us/en/support/articles/000005629/graphics.html).
|
||||
To install the Intel Graphics Driver for Windows on your system, follow the `driver installation guide <https://www.intel.com/content/www/us/en/support/articles/000005629/graphics.html>`_.
|
||||
|
||||
To check if you have this driver installed:
|
||||
|
||||
1. Type **device manager** in your **Search Windows** box and press Enter. The **Device Manager** opens.
|
||||
2. Click the drop-down arrow to view the **Display adapters**. You can see the adapter that is installed in your computer:
|
||||

|
||||
|
||||
.. image:: _static/images/DeviceManager.PNG
|
||||
:width: 400
|
||||
|
||||
3. Right-click the adapter name and select **Properties**.
|
||||
4. Click the **Driver** tab to see the driver version.
|
||||

|
||||
|
||||
.. image:: _static/images/DeviceDriverVersion.PNG
|
||||
:width: 400
|
||||
|
||||
|
||||
You are done updating your device driver and are ready to use your GPU.
|
||||
You are done updating your device driver and ready to use your GPU.
|
||||
|
||||
## Additional info
|
||||
Additional info
|
||||
####################
|
||||
|
||||
In the internal OpenVINO validation the following versions of Intel Graphics Driver were used:
|
||||
For your reference, the following versions of Intel® Graphics Driver were used in the OpenVINO internal validation:
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
+------------------+-------------------------------------------------------------------------------------+
|
||||
| Operation System | Driver version |
|
||||
+==================+=====================================================================================+
|
||||
| Ubuntu 20.04 | `22.35.24055 <https://github.com/intel/compute-runtime/releases/tag/22.35.24055>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------+
|
||||
| Ubuntu 18.04 | `21.38.21026 <https://github.com/intel/compute-runtime/releases/tag/21.38.21026>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------+
|
||||
| CentOS 7 | `19.41.14441 <https://github.com/intel/compute-runtime/releases/tag/19.41.14441>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------+
|
||||
| RHEL 8 | `22.28.23726 <https://github.com/intel/compute-runtime/releases/tag/22.28.23726>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------+
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| Operation System | Driver version |
|
||||
+==================+===========================================================================================+
|
||||
| Ubuntu 22.04 | `22.43.24595.30 <https://github.com/intel/compute-runtime/releases/tag/22.43.24595.30>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| Ubuntu 20.04 | `22.35.24055 <https://github.com/intel/compute-runtime/releases/tag/22.35.24055>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| Ubuntu 18.04 | `21.38.21026 <https://github.com/intel/compute-runtime/releases/tag/21.38.21026>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| CentOS 7 | `19.41.14441 <https://github.com/intel/compute-runtime/releases/tag/19.41.14441>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
| RHEL 8 | `22.28.23726 <https://github.com/intel/compute-runtime/releases/tag/22.28.23726>`__ |
|
||||
+------------------+-------------------------------------------------------------------------------------------+
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ Note that the commands are different for a Python installation and a C++ install
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
For more details on the openvino-dev PyPI package, see https://pypi.org/project/openvino-dev/.
|
||||
For more details on the openvino-dev PyPI package, see https://pypi.org/project/openvino-dev/2022.3.1/.
|
||||
|
||||
### Step 5. Test the Installation
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ Installing OpenVINO Runtime from APT is recommended for C++ developers. If you a
|
||||
|
||||
.. warning::
|
||||
|
||||
By downloading and using this container and the included software, you agree to the terms and conditions of the `software license agreements <https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf>`_.
|
||||
By downloading and using this container and the included software, you agree to the terms and conditions of the `software license agreements <https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf>`__.
|
||||
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
@@ -230,8 +231,8 @@ Now that you've installed OpenVINO Runtime, you're ready to run your own machine
|
||||
|
||||
* Try the `C++ Quick Start Example <openvino_docs_get_started_get_started_demos.html>`_ for step-by-step instructions on building and running a basic image classification C++ application.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/36741649/127170593-86976dc3-e5e4-40be-b0a6-206379cd7df5.jpg
|
||||
:width: 400
|
||||
.. image:: https://user-images.githubusercontent.com/36741649/127170593-86976dc3-e5e4-40be-b0a6-206379cd7df5.jpg
|
||||
:width: 400
|
||||
|
||||
* Visit the :ref:`Samples <code samples>` page for other C++ example applications to get you started with OpenVINO, such as:
|
||||
* `Basic object detection with the Hello Reshape SSD C++ sample <openvino_inference_engine_samples_hello_reshape_ssd_README.html>`_
|
||||
|
||||
@@ -7,59 +7,50 @@
|
||||
Installing OpenVINO Runtime from Homebrew is recommended for C++ developers.
|
||||
If you work with Python, consider :doc:`installing OpenVINO from PyPI <openvino_docs_install_guides_installing_openvino_pip>`
|
||||
|
||||
The current Homebrew package provides inference support for CPU only.
|
||||
Importantly, Homebrew always distributes the most recent package. You cannot use it to install previous versions of OpenVINO.
|
||||
|
||||
The current Homebrew package provides inference support for CPU (under macOS x86_64, macOS arm64, Linux x86_64), as well as GPU (under Linux x86_64 only).
|
||||
|
||||
|
||||
You can use `Homebrew <https://brew.sh/>`_ to install OpenVINO Runtime on macOS and Linux.
|
||||
|
||||
You can use `Homebrew <https://brew.sh/>`__ to install OpenVINO Runtime on macOS and Linux.
|
||||
OpenVINO™ Development Tools can be installed via PyPI only.
|
||||
See `Installing Additional Components <#optional-installing-additional-components>`__ for more information.
|
||||
|
||||
See the `Release Notes <https://www.intel.com/content/www/us/en/developer/articles/release-notes/openvino-2022-3-lts-relnotes.html>`_
|
||||
for more information on updates in the latest release.
|
||||
|
||||
.. warning::
|
||||
|
||||
By downloading and using this container and the included software, you agree to the terms and conditions of the
|
||||
`software license agreements <https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf>`_.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## Prerequisites
|
||||
.. tab:: System Requirements
|
||||
|
||||
### System Requirements
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
|
||||
@sphinxdirective
|
||||
.. tab:: Software Requirements
|
||||
|
||||
Full requirement listing is available on the `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`_
|
||||
.. tab:: macOS
|
||||
|
||||
@endsphinxdirective
|
||||
* `Homebrew <https://brew.sh/>`_
|
||||
* `CMake 3.13 or higher <https://cmake.org/download/>`_ (choose "macOS 10.13 or later"). Add `/Applications/CMake.app/Contents/bin` to path (for default installation).
|
||||
* `Python 3.7 - 3.10 <https://www.python.org/downloads/mac-osx/>`_ (choose 3.7 - 3.10). Install and add it to path.
|
||||
* Apple Xcode Command Line Tools. In the terminal, run `xcode-select --install` from any directory to install it.
|
||||
* (Optional) Apple Xcode IDE (not required for OpenVINO™, but useful for development)
|
||||
|
||||
### Software Requirements
|
||||
.. tab:: Linux
|
||||
|
||||
@sphinxdirective
|
||||
* `Homebrew <https://brew.sh/>`_
|
||||
* `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`__
|
||||
* GCC 7.5.0 (for Ubuntu 18.04) or GCC 9.3.0 (for Ubuntu 20.04)
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/>`__
|
||||
|
||||
.. tab:: macOS
|
||||
Installing OpenVINO Runtime
|
||||
################################
|
||||
|
||||
* `Homebrew <https://brew.sh/>`_
|
||||
* `CMake 3.13 or higher <https://cmake.org/download/>`_ (choose "macOS 10.13 or later"). Add `/Applications/CMake.app/Contents/bin` to path (for default installation).
|
||||
* `Python 3.7 - 3.10 <https://www.python.org/downloads/mac-osx/>`_ (choose 3.7 - 3.10). Install and add it to path.
|
||||
* Apple Xcode Command Line Tools. In the terminal, run `xcode-select --install` from any directory to install it.
|
||||
* (Optional) Apple Xcode IDE (not required for OpenVINO™, but useful for development)
|
||||
|
||||
.. tab:: Linux
|
||||
|
||||
* `Homebrew <https://brew.sh/>`_
|
||||
* `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`_
|
||||
* GCC 7.5.0 (for Ubuntu 18.04) or GCC 9.3.0 (for Ubuntu 20.04)
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/>`_
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## Installing OpenVINO Runtime
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
1. Make sure that you have installed HomeBrew on your system. If not, follow the instructions on `the Homebrew website <https://brew.sh/>`_ to install and configure it.
|
||||
1. Make sure that you have installed Homebrew on your system. If not, follow the instructions on `the Homebrew website <https://brew.sh/>`_ to install and configure it.
|
||||
|
||||
2. Open a command prompt terminal window, and run the following command to install OpenVINO Runtime:
|
||||
|
||||
@@ -67,27 +58,39 @@ Full requirement listing is available on the `System Requirements Page <https://
|
||||
|
||||
brew install openvino
|
||||
|
||||
3. Check if the installation was successful by listing all Homebrew packages:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
brew list
|
||||
|
||||
Congratulations, you've finished the installation!
|
||||
|
||||
|
||||
.. _intall additional components brew:
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## (Optional) Installing Additional Components
|
||||
|
||||
@sphinxdirective
|
||||
(Optional) Installing Additional Components
|
||||
#############################################
|
||||
|
||||
OpenVINO Development Tools is a set of utilities for working with OpenVINO and OpenVINO models. It provides tools like Model Optimizer, Benchmark Tool, Post-Training Optimization Tool, and Open Model Zoo Downloader. If you installed OpenVINO Runtime using Homebrew, OpenVINO Development Tools must be installed separately.
|
||||
|
||||
See **For C++ Developers** section on the :doc:`Install OpenVINO Development Tools <openvino_docs_install_guides_install_dev_tools>` page for instructions.
|
||||
OpenVINO Development Tools is a set of utilities for working with OpenVINO and OpenVINO models.
|
||||
It provides tools like Model Optimizer, Benchmark Tool, Post-Training Optimization Tool, and Open Model Zoo Downloader.
|
||||
If you installed OpenVINO Runtime using Homebrew, OpenVINO Development Tools must be installed separately.
|
||||
|
||||
|
||||
See the **For C++ Developers** section on the :doc:`Install OpenVINO Development Tools <openvino_docs_install_guides_install_dev_tools>` page for instructions.
|
||||
|
||||
OpenCV is necessary to run demos from Open Model Zoo (OMZ). Some OpenVINO samples can also extend their capabilities when compiled with OpenCV as a dependency. To install OpenCV for OpenVINO, see the `instructions on GitHub <https://github.com/opencv/opencv/wiki/BuildOpenCV4OpenVINO>`__.
|
||||
|
||||
|
||||
OpenCV is necessary to run demos from Open Model Zoo (OMZ). Some OpenVINO samples can also extend their capabilities when compiled with OpenCV as a dependency. To install OpenCV for OpenVINO, see the `instructions on GitHub <https://github.com/opencv/opencv/wiki/BuildOpenCV4OpenVINO>`_.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## Uninstalling OpenVINO
|
||||
|
||||
To uninstall OpenVINO via HomeBrew, use the following command:
|
||||
To uninstall OpenVINO via Homebrew, use the following command:
|
||||
```sh
|
||||
brew uninstall openvino
|
||||
```
|
||||
@@ -103,7 +106,7 @@ Now that you've installed OpenVINO Runtime, you can try the following things:
|
||||
* See pre-trained deep learning models in our :doc:`Open Model Zoo <model_zoo>`.
|
||||
* Learn more about :doc:`Inference with OpenVINO Runtime <openvino_docs_OV_UG_OV_Runtime_User_Guide>`.
|
||||
* See sample applications in :doc:`OpenVINO toolkit Samples Overview <openvino_docs_OV_UG_Samples_Overview>`.
|
||||
* Take a glance at the OpenVINO product home page: https://software.intel.com/en-us/openvino-toolkit.
|
||||
* Check out the OpenVINO product home page: https://software.intel.com/en-us/openvino-toolkit.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
@@ -7,19 +7,11 @@
|
||||
Installing OpenVINO Runtime from Conda Forge is recommended for C++ developers, as it provides only the C++ Runtime API.
|
||||
If you work with Python, consider :doc:`installing OpenVINO from PyPI <openvino_docs_install_guides_installing_openvino_pip>`
|
||||
|
||||
The current Anaconda package does not provide support for GPU inference.
|
||||
|
||||
.. tab:: System Requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
|
||||
.. comment to publish in the future, when gpu support comes back:
|
||||
|
||||
.. tab:: Processor Notes
|
||||
|
||||
| Not all Intel CPUs include integrated graphics processors.
|
||||
| See `Product Specifications <https://ark.intel.com/>`__ for information about your hardware.
|
||||
|
||||
.. tab:: Software
|
||||
|
||||
@@ -50,7 +42,7 @@ Installing OpenVINO Runtime with Anaconda Package Manager
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
conda install -c conda-forge openvino=2022.3.0
|
||||
conda install -c conda-forge openvino=2022.3.1
|
||||
|
||||
Congratulations! You have finished installing OpenVINO Runtime.
|
||||
|
||||
@@ -63,7 +55,7 @@ with the proper OpenVINO version number:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
conda remove openvino=2022.3.0
|
||||
conda remove openvino=2022.3.1
|
||||
|
||||
|
||||
What's Next?
|
||||
|
||||
@@ -26,11 +26,11 @@ This guide provides steps on creating a Docker image with Intel® Distribution o
|
||||
To launch a Linux image on WSL2 when trying to run inferences on a GPU, make sure that the following requirements are met:
|
||||
|
||||
- Only Windows 10 with 21H2 update or above installed and Windows 11 are supported.
|
||||
- Intel GPU driver on Windows host with version 30.0.100.9684 or above need be installed. Please see `this article`_ for more details.
|
||||
- From 2022.1 release, the Docker images contain preinstalled recommended version of OpenCL Runtime with WSL2 support.
|
||||
|
||||
.. _this article: https://www.intel.com/content/www/us/en/artificial-intelligence/harness-the-power-of-intel-igpu-on-your-machine.html#articleparagraph_983312434
|
||||
- Intel GPU driver for Windows, version 30.0.100.9684 or newer needs to be installed. For more details, refer to
|
||||
`this article at intel.com <https://www.intel.com/content/www/us/en/artificial-intelligence/harness-the-power-of-intel-igpu-on-your-machine.html#articleparagraph_983312434>`__.
|
||||
- Currently, the Docker images contain preinstalled recommended version of OpenCL Runtime with WSL2 support.
|
||||
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## Installation Flow
|
||||
@@ -63,60 +63,20 @@ You can also try our [Tutorials](https://github.com/openvinotoolkit/docker_ci/tr
|
||||
|
||||
## <a name="configure-image-docker-linux"></a>Configuring the Image for Different Devices
|
||||
|
||||
If you want to run inferences on a CPU or Intel® Neural Compute Stick 2, no extra configuration is needed. Go to <a href="#run-image-docker-linux">Running the image on different devices</a> for the next step.
|
||||
If you want to run inference on a CPU or Intel® Neural Compute Stick 2, no extra configuration is needed. Go to <a href="#run-image-docker-linux">Running the image on different devices</a> for the next step.
|
||||
|
||||
### Configuring Docker Image for GPU
|
||||
|
||||
By default, the distributed Docker image for OpenVINO has the recommended version of Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL Driver for the operating system installed inside. If you want to build an image with a custom version of OpenCL Runtime included, you need to modify the Dockerfile using the lines below (the 19.41.14441 version is used as an example) and build the image manually:
|
||||
|
||||
**Ubuntu 18.04/20.04**:
|
||||
|
||||
```sh
|
||||
WORKDIR /tmp/opencl
|
||||
RUN useradd -ms /bin/bash -G video,users openvino && \
|
||||
chown openvino -R /home/openvino
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends ocl-icd-libopencl1 && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
curl -L "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-gmmlib_19.3.2_amd64.deb" --output "intel-gmmlib_19.3.2_amd64.deb" && \
|
||||
curl -L "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-core_1.0.2597_amd64.deb" --output "intel-igc-core_1.0.2597_amd64.deb" && \
|
||||
curl -L "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-igc-opencl_1.0.2597_amd64.deb" --output "intel-igc-opencl_1.0.2597_amd64.deb" && \
|
||||
curl -L "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-opencl_19.41.14441_amd64.deb" --output "intel-opencl_19.41.14441_amd64.deb" && \
|
||||
curl -L "https://github.com/intel/compute-runtime/releases/download/19.41.14441/intel-ocloc_19.41.14441_amd64.deb" --output "intel-ocloc_19.04.12237_amd64.deb" && \
|
||||
dpkg -i /tmp/opencl/*.deb && \
|
||||
ldconfig && \
|
||||
rm /tmp/opencl
|
||||
```
|
||||
|
||||
**RHEL 8**:
|
||||
|
||||
```sh
|
||||
WORKDIR /tmp/opencl
|
||||
RUN useradd -ms /bin/bash -G video,users openvino && \
|
||||
chown openvino -R /home/openvino
|
||||
RUN groupmod -g 44 video
|
||||
|
||||
RUN yum update -y && yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
|
||||
yum update -y && yum install -y ocl-icd ocl-icd-devel && \
|
||||
yum clean all && rm -rf /var/cache/yum && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-19.3.2-1.el7.x86_64.rpm/download -o intel-gmmlib-19.3.2-1.el7.x86_64.rpm && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm/download -o intel-gmmlib-devel-19.3.2-1.el7.x86_64.rpm && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-core-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-core-1.0.2597-1.el7.x86_64.rpm && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-opencl-1.0.2597-1.el7.x86_64.rpm && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm/download -o intel-igc-opencl-devel-1.0.2597-1.el7.x86_64.rpm && \
|
||||
curl -L https://sourceforge.net/projects/intel-compute-runtime/files/19.41.14441/centos-7/intel-opencl-19.41.14441-1.el7.x86_64.rpm/download -o intel-opencl-19.41.14441-1.el7.x86_64.rpm \
|
||||
rpm -ivh ${TEMP_DIR}/*.rpm && \
|
||||
ldconfig && \
|
||||
rm -rf ${TEMP_DIR} && \
|
||||
yum remove -y epel-release
|
||||
```
|
||||
@sphinxdirective
|
||||
If you want to run inference on a GPU, follow the instructions provided in the guide on
|
||||
:doc:`Configuration for Intel GPU <openvino_docs_install_guides_configurations_for_intel_gpu>`
|
||||
@endsphinxdirective
|
||||
|
||||
### <a name="set-up-hddldaemon"></a>Configuring Docker Image for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
> **NOTE**: When building the Docker image, create a user in the Dockerfile that has the same UID (User Identifier) and GID (Group Identifier) as the user which that runs hddldaemon on the host, and then run the application in the Docker image with this user. This step is necessary to run the container as a non-root user.
|
||||
|
||||
To use the Docker container for inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, do the following steps:
|
||||
To s:use the Docker container for inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, do the following:
|
||||
|
||||
1. Set up the environment on the host machine to be used for running Docker. It is required to execute `hddldaemon`, which is responsible for communication between the HDDL plugin and the board. To learn how to set up the environment (the OpenVINO package or HDDL package must be pre-installed), see [Configuration guide for HDDL device](https://github.com/openvinotoolkit/docker_ci/blob/master/install_guide_vpu_hddl.md) or [Configurations for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs on Linux](configurations-for-ivad-vpu.md).
|
||||
2. Run `hddldaemon` on the host in a separate terminal session using the following command:
|
||||
|
||||
@@ -4,7 +4,7 @@ With the OpenVINO™ 2022.3 release, you can download and use archive files to i
|
||||
|
||||
Installing OpenVINO Runtime from archive files is recommended for C++ developers. If you are working with Python, the PyPI package has everything needed for Python development and deployment on CPU and GPUs. See the [Install OpenVINO from PyPI](installing-openvino-pip.md) page for instructions on how to install OpenVINO Runtime for Python using PyPI.
|
||||
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/) only.
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/2022.3.1/) only.
|
||||
|
||||
See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/openvino-2022-3-lts-relnotes.html) for more information on updates in the latest release.
|
||||
|
||||
@@ -14,7 +14,7 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
.. tab:: System Requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`_
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
|
||||
.. tab:: Processor Notes
|
||||
|
||||
@@ -25,8 +25,8 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
|
||||
.. tab:: Software
|
||||
|
||||
* `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`_
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/>`_
|
||||
* `CMake 3.13 or higher, 64-bit <https://cmake.org/download/>`__
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/>`__
|
||||
* GCC:
|
||||
|
||||
.. tab:: Ubuntu 18.04
|
||||
@@ -84,53 +84,66 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
|
||||
cd <user_home>/Downloads
|
||||
|
||||
4. Download the `OpenVINO Runtime archive file for your system <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/>`_, extract the files, rename the extracted folder and move it to the desired path:
|
||||
4. Download the `OpenVINO Runtime archive file for your system <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/>`__, extract the files, rename the extracted folder and move it to the desired path:
|
||||
|
||||
.. tab:: Ubuntu 20.04
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu20_2022.3.0.9052.9752fafe8eb_x86_64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_ubuntu20_2022.3.1.9227.cf2c7da5689_x86_64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu20_2022.3.1.9227.cf2c7da5689_x86_64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
.. tab:: Ubuntu 18.04
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_ubuntu18_2022.3.0.9052.9752fafe8eb_x86_64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu18_2022.3.0.9052.9752fafe8eb_x86_64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_ubuntu18_2022.3.1.9227.cf2c7da5689_x86_64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv l_openvino_toolkit_ubuntu18_2022.3.1.9227.cf2c7da5689_x86_64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
.. tab:: RHEL 8
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_rhel8_2022.3.0.9052.9752fafe8eb_x86_64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_rhel8_2022.3.0.9052.9752fafe8eb_x86_64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_rhel8_2022.3.1.9227.cf2c7da5689_x86_64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv l_openvino_toolkit_rhel8_2022.3.1.9227.cf2c7da5689_x86_64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
.. tab:: CentOS 7
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_centos7_2022.3.0.9052.9752fafe8eb_x86_64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_centos7_2022.3.0.9052.9752fafe8eb_x86_64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_centos7_2022.3.1.9227.cf2c7da5689_x86_64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv l_openvino_toolkit_centos7_2022.3.1.9227.cf2c7da5689_x86_64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
5. Install required system dependencies on Linux. To do this, OpenVINO provides a script in the extracted installation directory. Run the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2022.3.0
|
||||
cd /opt/intel/openvino_2022.3.1
|
||||
sudo -E ./install_dependencies/install_openvino_dependencies.sh
|
||||
|
||||
6. For simplicity, it is useful to create a symbolic link as below:
|
||||
6. (Optional) Install *numpy* Python Library:
|
||||
|
||||
.. note::
|
||||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2022.3.1/python/python.<x>`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel/openvino_2022.3.1
|
||||
python3 -m pip install -r ./python/python3.<x>/requirements.txt
|
||||
|
||||
7. For simplicity, it is useful to create a symbolic link as below:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd /opt/intel
|
||||
sudo ln -s openvino_2022.3.0 openvino_2022
|
||||
sudo ln -s openvino_2022.3.1 openvino_2022
|
||||
|
||||
.. note::
|
||||
If you have already installed a previous release of OpenVINO 2022, a symbolic link to the ``openvino_2022`` folder may already exist. Unlink the previous link with ``sudo unlink openvino_2022``, and then re-run the command above.
|
||||
|
||||
@@ -6,19 +6,19 @@ Installing OpenVINO Runtime from archive files is recommended for C++ developers
|
||||
|
||||
See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/openvino-2022-3-lts-relnotes.html) for more information on updates in the latest release.
|
||||
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/) only.
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/2022.3.1/) only.
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
.. tab:: System Requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`_
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
|
||||
.. tab:: Software Requirements
|
||||
|
||||
* `CMake 3.13 or higher <https://cmake.org/download/>`_ (choose "macOS 10.13 or later"). Add `/Applications/CMake.app/Contents/bin` to path (for default install).
|
||||
* `Python 3.7 - 3.10 <https://www.python.org/downloads/mac-osx/>`_ (choose 3.7 - 3.10). Install and add to path.
|
||||
* `CMake 3.13 or higher <https://cmake.org/download/>`__ (choose "macOS 10.13 or later"). Add `/Applications/CMake.app/Contents/bin` to path (for default install).
|
||||
* `Python 3.7 - 3.10 <https://www.python.org/downloads/mac-osx/>`__ (choose 3.7 - 3.10). Install and add to path.
|
||||
* Apple Xcode Command Line Tools. In the terminal, run `xcode-select --install` from any directory
|
||||
* (Optional) Apple Xcode IDE (not required for OpenVINO™, but useful for development)
|
||||
|
||||
@@ -47,29 +47,42 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
|
||||
cd <user_home>/Downloads
|
||||
|
||||
4. Download the `OpenVINO Runtime archive file for macOS <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/macos/>`_, extract the files, rename the extracted folder and move it to the desired path:
|
||||
4. Download the `OpenVINO Runtime archive file for macOS <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/macos/>`__, extract the files, rename the extracted folder and move it to the desired path:
|
||||
|
||||
.. tab:: x86, 64-bit
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/macos/m_openvino_toolkit_macos_10_15_2022.3.0.9052.9752fafe8eb_x86_64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_10_15_2022.3.0.9052.9752fafe8eb_x86_64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/macos/m_openvino_toolkit_macos_10_15_2022.3.1.9227.cf2c7da5689_x86_64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv m_openvino_toolkit_macos_10_15_2022.3.1.9227.cf2c7da5689_x86_64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
.. tab:: ARM, 64-bit
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/macos/m_openvino_toolkit_macos_11_0_2022.3.0.9052.9752fafe8eb_arm64.tgz --output openvino_2022.3.0.tgz
|
||||
tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv m_openvino_toolkit_macos_11_0_2022.3.0.9052.9752fafe8eb_arm64 /opt/intel/openvino_2022.3.0
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/macos/m_openvino_toolkit_macos_11_0_2022.3.1.9227.cf2c7da5689_arm64.tgz --output openvino_2022.3.1.tgz
|
||||
tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv m_openvino_toolkit_macos_11_0_2022.3.1.9227.cf2c7da5689_arm64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
5. For simplicity, it is useful to create a symbolic link as below:
|
||||
5. (Optional) Install *numpy* Python Library:
|
||||
|
||||
.. note::
|
||||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``opt/intel/openvino_2022.3.1/python/python.<x>`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo ln -s openvino_2022.3.0 openvino_2022
|
||||
cd /opt/intel/openvino_2022.3.1
|
||||
python3 -m pip install -r ./python/python3.<x>/requirements.txt
|
||||
|
||||
6. For simplicity, it is useful to create a symbolic link as below:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo ln -s openvino_2022.3.1 openvino_2022
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -122,21 +135,21 @@ Now that you've installed OpenVINO Runtime, you're ready to run your own machine
|
||||
|
||||
Visit the :ref:`Tutorials <notebook tutorials>` page for more Jupyter Notebooks to get you started with OpenVINO, such as:
|
||||
|
||||
* `OpenVINO Python API Tutorial <https://docs.openvino.ai/2022.3/notebooks/002-openvino-api-with-output.html>`_
|
||||
* `Basic image classification program with Hello Image Classification <https://docs.openvino.ai/2022.3/notebooks/001-hello-world-with-output.html>`_
|
||||
* `Convert a PyTorch model and use it for image background removal <https://docs.openvino.ai/2022.3/notebooks/205-vision-background-removal-with-output.html>`_
|
||||
* `OpenVINO Python API Tutorial <https://docs.openvino.ai/2022.3/notebooks/002-openvino-api-with-output.html>`__
|
||||
* `Basic image classification program with Hello Image Classification <https://docs.openvino.ai/2022.3/notebooks/001-hello-world-with-output.html>`__
|
||||
* `Convert a PyTorch model and use it for image background removal <https://docs.openvino.ai/2022.3/notebooks/205-vision-background-removal-with-output.html>`__
|
||||
|
||||
.. tab:: Get started with C++
|
||||
|
||||
Try the `C++ Quick Start Example <openvino_docs_get_started_get_started_demos.html>`_ for step-by-step instructions on building and running a basic image classification C++ application.
|
||||
Try the `C++ Quick Start Example <openvino_docs_get_started_get_started_demos.html>`__ for step-by-step instructions on building and running a basic image classification C++ application.
|
||||
|
||||
.. image:: https://user-images.githubusercontent.com/36741649/127170593-86976dc3-e5e4-40be-b0a6-206379cd7df5.jpg
|
||||
:width: 400
|
||||
|
||||
Visit the :ref:`Samples <code samples>` page for other C++ example applications to get you started with OpenVINO, such as:
|
||||
|
||||
* `Basic object detection with the Hello Reshape SSD C++ sample <openvino_inference_engine_samples_hello_reshape_ssd_README.html>`_
|
||||
* `Automatic speech recognition C++ sample <openvino_inference_engine_samples_speech_sample_README.html>`_
|
||||
* `Basic object detection with the Hello Reshape SSD C++ sample <openvino_inference_engine_samples_hello_reshape_ssd_README.html>`__
|
||||
* `Automatic speech recognition C++ sample <openvino_inference_engine_samples_speech_sample_README.html>`__
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ With the OpenVINO™ 2022.3 release, you can download and use archive files to i
|
||||
|
||||
Installing OpenVINO Runtime from archive files is recommended for C++ developers. If you are working with Python, the PyPI package has everything needed for Python development and deployment on CPU and GPUs. See the [Install OpenVINO from PyPI](installing-openvino-pip.md) page for instructions on how to install OpenVINO Runtime for Python using PyPI.
|
||||
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/) only.
|
||||
> **NOTE**: Since the OpenVINO™ 2022.1 release, the following development tools: Model Optimizer, Post-Training Optimization Tool, Model Downloader and other Open Model Zoo tools, Accuracy Checker, and Annotation Converter can be installed via [pypi.org](https://pypi.org/project/openvino-dev/2022.3.1/) only.
|
||||
|
||||
See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articles/release-notes/openvino-2022-3-lts-relnotes.html) for more information on updates in the latest release.
|
||||
|
||||
@@ -14,7 +14,7 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
.. tab:: System Requirements
|
||||
|
||||
| Full requirement listing is available in:
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`_
|
||||
| `System Requirements Page <https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html>`__
|
||||
|
||||
.. tab:: Processor Notes
|
||||
|
||||
@@ -25,18 +25,18 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
|
||||
.. tab:: Software
|
||||
|
||||
* `Microsoft Visual Studio 2019 with MSBuild <https://visualstudio.microsoft.com/vs/older-downloads/>`_ or `Microsoft Visual Studio 2022 <http://visualstudio.microsoft.com/downloads/>`_
|
||||
* `CMake 3.14 or higher, 64-bit <https://cmake.org/download/>`_ (optional, only required for building sample applications)
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/windows/>`_
|
||||
* `Microsoft Visual Studio 2019 with MSBuild <https://visualstudio.microsoft.com/vs/older-downloads/>`__ or `Microsoft Visual Studio 2022 <http://visualstudio.microsoft.com/downloads/>`__
|
||||
* `CMake 3.14 or higher, 64-bit <https://cmake.org/download/>`__ (optional, only required for building sample applications)
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/windows/>`__
|
||||
|
||||
.. note::
|
||||
To install Microsoft Visual Studio 2019, follow the `Microsoft Visual Studio installation guide <https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2019>`_. You can choose to download the Community version. During installation in the **Workloads** tab, choose **Desktop development with C++**.
|
||||
To install Microsoft Visual Studio 2019, follow the `Microsoft Visual Studio installation guide <https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2019>`__. You can choose to download the Community version. During installation in the **Workloads** tab, choose **Desktop development with C++**.
|
||||
|
||||
.. note::
|
||||
You can either use `cmake<version>.msi` which is the installation wizard or `cmake<version>.zip` where you have to go into the `bin` folder and then manually add the path to environmental variables.
|
||||
You can either use ``cmake<version>.msi`` which is the installation wizard or ``cmake<version>.zip`` where you have to go into the ``bin`` folder and then manually add the path to environmental variables.
|
||||
|
||||
.. important::
|
||||
When installing Python, make sure you click the option **Add Python 3.x to PATH** to `add Python <https://docs.python.org/3/using/windows.html#installation-steps>`_ to your `PATH` environment variable.
|
||||
When installing Python, make sure you click the option **Add Python 3.x to PATH** to `add Python <https://docs.python.org/3/using/windows.html#installation-steps>`__ to your ``PATH`` environment variable.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
@@ -44,42 +44,76 @@ See the [Release Notes](https://www.intel.com/content/www/us/en/developer/articl
|
||||
|
||||
### <a name="install-openvino-archive-windows"></a>Step 1: Download and Install OpenVINO Core Components
|
||||
|
||||
1. Create an `Intel` folder in the `C:\Program Files (x86)\` directory. Skip this step if the folder already exists.
|
||||
@sphinxdirective
|
||||
|
||||
You can also do this via command-lines. Open a new command prompt window as administrator by right-clicking **Command Prompt** from the Start menu and select **Run as administrator**, and then run the following command:
|
||||
```sh
|
||||
mkdir "C:\Program Files (x86)\Intel"
|
||||
```
|
||||
> **NOTE**: `C:\Program Files (x86)\Intel` is the recommended folder. You may also use a different path if desired or if you don't have administrator privileges on your computer.
|
||||
1. Create an ``Intel`` folder in the ``C:\Program Files (x86)\`` directory. Skip this step if the folder already exists.
|
||||
|
||||
2. Download the [OpenVINO Runtime archive file for Windows](https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/windows/) to your local `Downloads` folder.
|
||||
You can also do this via command-lines. Open a new command prompt window as an administrator by right-clicking **Command Prompt** from the Start menu and select **Run as administrator**, and then run the following command:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
mkdir "C:\Program Files (x86)\Intel"
|
||||
|
||||
.. note::
|
||||
|
||||
``C:\Program Files (x86)\Intel`` is the recommended folder. You may also use a different path if desired or if you don't have administrator privileges on your computer.
|
||||
|
||||
2. Download the `OpenVINO Runtime archive file for Windows <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/windows/>`__ to your local ``Downloads`` folder.
|
||||
|
||||
If you prefer using command-lines, run the following commands in the command prompt window you opened:
|
||||
```sh
|
||||
cd <user_home>/Downloads
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/windows/w_openvino_toolkit_windows_2022.3.0.9052.9752fafe8eb_x86_64.zip --output openvino_2022.3.0.zip
|
||||
```
|
||||
> **NOTE**: A `.sha256` file is provided together with the archive file to validate your download process. To do that, download the `.sha256` file from the same repository and run `CertUtil -hashfile openvino_2022.3.0.zip SHA256`. Compare the returned value in the output with what's in the `.sha256` file: if the values are the same, you have downloaded the correct file successfully; if not, create a Support ticket [here](https://www.intel.com/content/www/us/en/support/contact-intel.html).
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd <user_home>/Downloads
|
||||
curl -L https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/windows/w_openvino_toolkit_windows_2022.3.1.9227.cf2c7da5689_x86_64.zip --output openvino_2022.3.1.zip
|
||||
|
||||
|
||||
3. Use your favorite tool to extract the archive file, rename the extracted folder, and move it to the `C:\Program Files (x86)\Intel` directory.
|
||||
.. note::
|
||||
|
||||
A ``.sha256`` file is provided together with the archive file to validate your download process. To do that, download the ``.sha256`` file from the same repository and run ``CertUtil -hashfile openvino_2022.3.1.zip SHA256``. Compare the returned value in the output with what's in the ``.sha256`` file: if the values are the same, you have downloaded the correct
|
||||
file successfully; if not, create a Support ticket `here <https://www.intel.com/content/www/us/en/support/contact-intel.html>`__.
|
||||
|
||||
|
||||
3. Use your favorite tool to extract the archive file, rename the extracted folder, and move it to the ``C:\Program Files (x86)\Intel`` directory.
|
||||
|
||||
To do this step using command-lines, run the following commands in the command prompt window you opened:
|
||||
```sh
|
||||
tar -xf openvino_2022.3.0.zip
|
||||
ren w_openvino_toolkit_windows_2022.3.0.9052.9752fafe8eb_x86_64 openvino_2022.3.0
|
||||
move openvino_2022.3.0 "C:\Program Files (x86)\Intel"
|
||||
```
|
||||
|
||||
4. For simplicity, it is useful to create a symbolic link. Open a command prompt window as administrator (see Step 1 for how to do this) and run the following commands:
|
||||
```sh
|
||||
cd C:\Program Files (x86)\Intel
|
||||
mklink /D openvino_2022 openvino_2022.3.0
|
||||
```
|
||||
> **NOTE**: If you have already installed a previous release of OpenVINO 2022, a symbolic link to the `openvino_2022` folder may already exist. If you want to override it, nagivate to the `C:\Program Files (x86)\Intel` folder and delete the existing linked folder before running the `mklink` command.
|
||||
.. code-block:: sh
|
||||
|
||||
tar -xf openvino_2022.3.1.zip
|
||||
ren w_openvino_toolkit_windows_2022.3.1.9227.cf2c7da5689_x86_64 openvino_2022.3.1
|
||||
move openvino_2022.3.1 "C:\Program Files (x86)\Intel"
|
||||
|
||||
|
||||
Congratulations, you finished the installation! The `C:\Program Files (x86)\Intel\openvino_2022` folder now contains the core components for OpenVINO. If you used a different path in Step 1, you will find the `openvino_2022` folder there. The path to the `openvino_2022` directory is also referred as `<INSTALL_DIR>` throughout the OpenVINO documentation.
|
||||
6. (Optional) Install *numpy* Python Library:
|
||||
|
||||
.. note::
|
||||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``C:\Program Files (x86)\Intel\openvino_2022.3.1\python\python.<x>`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd "C:\Program Files (x86)\Intel\openvino_2022.3.1"
|
||||
python -m pip install -r .\python\python3.<x>\requirements.txt
|
||||
|
||||
|
||||
5. For simplicity, it is useful to create a symbolic link. Open a command prompt window as administrator (see Step 1 for how to do this) and run the following commands:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd C:\Program Files (x86)\Intel
|
||||
mklink /D openvino_2022 openvino_2022.3.0
|
||||
|
||||
.. note::
|
||||
|
||||
If you have already installed a previous release of OpenVINO 2022, a symbolic link to the ``openvino_2022`` folder may already exist. If you want to override it, navigate to the ``C:\Program Files (x86)\Intel`` folder and delete the existing linked folder before running the ``mklink`` command.
|
||||
|
||||
|
||||
Congratulations, you finished the installation! The ``C:\Program Files (x86)\Intel\openvino_2022`` folder now contains the core components for OpenVINO. If you used a different path in Step 1, you will find the ``openvino_2022`` folder there. The path to the ``openvino_2022`` directory is also referred as ``<INSTALL_DIR>`` throughout the OpenVINO documentation.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
### <a name="set-the-environment-variables-windows"></a>Step 2: Configure the Environment
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Use APT <openvino_docs_install_guides_installing_openvino_apt>
|
||||
Use YUM <openvino_docs_install_guides_installing_openvino_yum>
|
||||
Use Conda Forge <openvino_docs_install_guides_installing_openvino_conda>
|
||||
Use HomeBrew <openvino_docs_install_guides_installing_openvino_brew>
|
||||
Use Homebrew <openvino_docs_install_guides_installing_openvino_brew>
|
||||
Use Docker <openvino_docs_install_guides_installing_openvino_docker_linux>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ If you want to install OpenVINO™ Runtime on your Linux machine, these are your
|
||||
* :doc:`Install OpenVINO Runtime using from APT <openvino_docs_install_guides_installing_openvino_apt>`
|
||||
* :doc:`Install OpenVINO Runtime using from YUM <openvino_docs_install_guides_installing_openvino_yum>`
|
||||
* :doc:`Install OpenVINO Runtime using Conda Forge <openvino_docs_install_guides_installing_openvino_conda>`
|
||||
* :doc:`Install OpenVINO Runtime using HomeBrew <openvino_docs_install_guides_installing_openvino_brew>`
|
||||
* :doc:`Install OpenVINO Runtime using Homebrew <openvino_docs_install_guides_installing_openvino_brew>`
|
||||
* :doc:`Install OpenVINO using Docker <openvino_docs_install_guides_installing_openvino_docker_linux>`
|
||||
|
||||
For a full selection of distribution channels, see the
|
||||
|
||||
@@ -6,7 +6,7 @@ Currently only the following ways are provided to install OpenVINO™:
|
||||
* [Install OpenVINO Runtime from APT](@ref openvino_docs_install_guides_installing_openvino_apt)
|
||||
* [Install OpenVINO Runtime from YUM](@ref openvino_docs_install_guides_installing_openvino_yum)
|
||||
* [Install OpenVINO from PyPI](installing-openvino-pip.md)
|
||||
* [Install OpenVINO Runtime via HomeBrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO Runtime via Homebrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO with Docker](installing-openvino-docker-linux.md)
|
||||
* [Build From Source](https://github.com/openvinotoolkit/openvino/wiki/BuildingCode)
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
From Archive <openvino_docs_install_guides_installing_openvino_from_archive_macos>
|
||||
From PyPI <openvino_docs_install_guides_installing_openvino_pip>
|
||||
Using HomeBrew <openvino_docs_install_guides_installing_openvino_brew>
|
||||
Using Homebrew <openvino_docs_install_guides_installing_openvino_brew>
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
If you want to install OpenVINO™ Runtime on macOS, there are a few ways to accomplish this. We prepared following options for you:
|
||||
|
||||
* [Install OpenVINO Runtime from an Archive File](installing-openvino-from-archive-macos.md)
|
||||
* [Install OpenVINO Runtime via HomeBrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO Runtime via Homebrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO from PyPI](installing-openvino-pip.md)
|
||||
|
||||
For a full selection of distribution channels, see the [OpenVINO Installation Selector Tool](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/download.html)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Currently only the following ways are provided to install OpenVINO™ on macOS:
|
||||
|
||||
* [Install OpenVINO Runtime using an Archive File](installing-openvino-from-archive-macos.md)
|
||||
* [Install OpenVINO Runtime using HomeBrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO Runtime using Homebrew](installing-openvino-brew.md)
|
||||
* [Install OpenVINO using PyPI](installing-openvino-pip.md)
|
||||
* [Build From Source](https://github.com/openvinotoolkit/openvino/wiki/BuildingCode)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ You can install both OpenVINO™ Runtime and OpenVINO Development Tools through
|
||||
Installing OpenVINO Runtime
|
||||
###########################
|
||||
|
||||
For system requirements and troubleshooting, see https://pypi.org/project/openvino/
|
||||
For system requirements and troubleshooting, see https://pypi.org/project/openvino/2022.3.1/
|
||||
|
||||
Step 1. Set Up Python Virtual Environment
|
||||
+++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
@@ -37,21 +37,21 @@
|
||||
|
||||
The `/opt/intel` path is the recommended folder path for administrators or root users. If you prefer to install OpenVINO in regular userspace, the recommended path is `/home/<USER>/intel`. You may use a different path if desired.
|
||||
|
||||
3. Go to your `~/Downloads` directory and download OpenVINO Runtime archive file for Debian from `OpenVINO package repository <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/>`_.
|
||||
3. Go to your `~/Downloads` directory and download OpenVINO Runtime archive file for Debian from the `OpenVINO package repository <https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/>`_.
|
||||
|
||||
.. tab:: ARM 32-bit
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd ~/Downloads/
|
||||
sudo wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_debian9_2022.3.0.9052.9752fafe8eb_armhf.tgz -O openvino_2022.3.0.tgz
|
||||
sudo wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_armhf.tgz -O openvino_2022.3.1.tgz
|
||||
|
||||
.. tab:: ARM 64-bit
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd ~/Downloads/
|
||||
sudo wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3/linux/l_openvino_toolkit_debian9_2022.3.0.9052.9752fafe8eb_arm64.tgz -O openvino_2022.3.0.tgz
|
||||
sudo wget https://storage.openvinotoolkit.org/repositories/openvino/packages/2022.3.1/linux/l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64.tgz -O openvino_2022.3.1.tgz
|
||||
|
||||
4. Extract the archive file and move it to the installation folder:
|
||||
|
||||
@@ -59,15 +59,15 @@
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_debian9_2022.3.0.9052.9752fafe8eb_armhf /opt/intel/openvino_2022.3.0
|
||||
sudo tar -xf openvino_2022.3.1.tgz
|
||||
sudo mv l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_armhf /opt/intel/openvino_2022.3.1
|
||||
|
||||
.. tab:: ARM 64-bit
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo tar -xf openvino_2022.3.0.tgz
|
||||
sudo mv l_openvino_toolkit_debian9_2022.3.0.9052.9752fafe8eb_arm64 /opt/intel/openvino_2022.3.0
|
||||
sudo mv l_openvino_toolkit_debian9_2022.3.1.9227.cf2c7da5689_arm64 /opt/intel/openvino_2022.3.1
|
||||
|
||||
5. Install required system dependencies on Linux. To do this, OpenVINO provides a script in the extracted installation directory. Run the following command:
|
||||
|
||||
@@ -75,11 +75,24 @@
|
||||
|
||||
sudo -E ./install_dependencies/install_openvino_dependencies.sh
|
||||
|
||||
6. For simplicity, it is useful to create a symbolic link as below:
|
||||
6. (Optional) Install *numpy* Python Library:
|
||||
|
||||
.. note::
|
||||
|
||||
This step is required only when you decide to use Python API.
|
||||
|
||||
You can use the ``requirements.txt`` file from the ``/opt/intel/openvino_2022.3.1/python/python.<x>`` folder:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo ln -s openvino_2022.3.0 openvino_2022
|
||||
cd /opt/intel/openvino_2022.3.1
|
||||
pip3 install -r ./python/python3.<x>/requirements.txt
|
||||
|
||||
7. For simplicity, it is useful to create a symbolic link as below:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo ln -s openvino_2022.3.1 openvino_2022
|
||||
|
||||
.. note::
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
With the OpenVINO™ 2022.3 release, you can install OpenVINO Runtime on Linux using the YUM repository. OpenVINO™ Development Tools can be installed via PyPI only. See :ref:`Installing Additional Components <intall additional components yum>` for more information.
|
||||
With the OpenVINO™ 2022.3 release, you can install OpenVINO Runtime on Linux using the YUM repository.
|
||||
OpenVINO™ Development Tools can be installed via PyPI only. See
|
||||
`Installing Additional Components <#step-3-optional-install-additional-components>`__ for more information.
|
||||
|
||||
See the `Release Notes <https://www.intel.com/content/www/us/en/developer/articles/release-notes/openvino-2022-3-lts-relnotes.html>`_ for more information on updates in the latest release.
|
||||
|
||||
@@ -39,15 +41,18 @@ Installing OpenVINO Runtime from YUM is recommended for C++ developers. If you a
|
||||
* GCC 8.2.0
|
||||
* `Python 3.7 - 3.10, 64-bit <https://www.python.org/downloads/>`_
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## Install OpenVINO Runtime
|
||||
|
||||
### Step 1: Set Up the Repository
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
1. Create a YUM repository file (`openvino-2022.repo`) in the `/tmp` directory as a normal user:
|
||||
Install OpenVINO Runtime
|
||||
########################
|
||||
|
||||
Step 1: Set Up the Repository
|
||||
+++++++++++++++++++++++++++++
|
||||
|
||||
|
||||
1. Create a YUM repository file (``openvino-2022.repo``) in the ``/tmp`` directory as a normal user:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
@@ -61,7 +66,7 @@ Installing OpenVINO Runtime from YUM is recommended for C++ developers. If you a
|
||||
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
|
||||
EOF
|
||||
|
||||
2. Move the new `openvino-2022.repo` file to the YUM configuration directory, i.e. `/etc/yum.repos.d`:
|
||||
2. Move the new ``openvino-2022.repo`` file to the YUM configuration directory, i.e. ``/etc/yum.repos.d``:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
@@ -82,13 +87,12 @@ To list available OpenVINO packages, use the following command:
|
||||
|
||||
yum list 'openvino*'
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
### Step 2: Install OpenVINO Runtime Using the YUM Package Manager
|
||||
Step 2: Install OpenVINO Runtime Using the YUM Package Manager
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
#### Install OpenVINO Runtime
|
||||
|
||||
@sphinxdirective
|
||||
Install OpenVINO Runtime
|
||||
-------------------------
|
||||
|
||||
.. tab:: The Latest Version
|
||||
|
||||
@@ -112,11 +116,9 @@ To list available OpenVINO packages, use the following command:
|
||||
|
||||
sudo yum install openvino-2022.3.0
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
#### Check for Installed Packages and Version
|
||||
|
||||
@sphinxdirective
|
||||
Check for Installed Packages and Version
|
||||
-----------------------------------------
|
||||
|
||||
Run the following command:
|
||||
|
||||
@@ -126,25 +128,24 @@ Run the following command:
|
||||
|
||||
.. _intall additional components yum:
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
### Step 3 (Optional): Install Additional Components
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
Step 3 (Optional): Install Additional Components
|
||||
+++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
OpenVINO Development Tools is a set of utilities for working with OpenVINO and OpenVINO models. It provides tools like Model Optimizer, Benchmark Tool, Post-Training Optimization Tool, and Open Model Zoo Downloader. If you installed OpenVINO Runtime using YUM, OpenVINO Development Tools must be installed separately.
|
||||
|
||||
See **For C++ Developers** section on the :doc:`Install OpenVINO Development Tools <openvino_docs_install_guides_install_dev_tools>` page for instructions.
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
### Step 4 (Optional): Configure Inference on Non-CPU Devices
|
||||
Step 4 (Optional): Configure Inference on Non-CPU Devices
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
To enable the toolkit components to use processor graphics (GPU) on your system, follow the steps in [GPU Setup Guide](@ref openvino_docs_install_guides_configurations_for_intel_gpu).
|
||||
|
||||
### Step 5: Build Samples
|
||||
|
||||
@sphinxdirective
|
||||
Step 5: Build Samples
|
||||
++++++++++++++++++++++
|
||||
|
||||
To build the C++ or C sample applications for Linux, run the `build_samples.sh` script:
|
||||
|
||||
@@ -160,13 +161,12 @@ To build the C++ or C sample applications for Linux, run the `build_samples.sh`
|
||||
|
||||
/usr/share/openvino/samples/c/build_samples.sh
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
For more information, refer to <a href="openvino_docs_OV_UG_Samples_Overview.html#build-samples-linux">Build the Sample Applications on Linux</a>.
|
||||
For more information, refer to :doc:`Build the Sample Applications on Linux <openvino_docs_OV_UG_Samples_Overview>`.
|
||||
|
||||
### Uninstalling OpenVINO Runtime
|
||||
Uninstalling OpenVINO Runtime
|
||||
##############################
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
To uninstall OpenVINO Runtime via YUM, run the following command based on your needs:
|
||||
|
||||
@@ -189,11 +189,10 @@ To uninstall OpenVINO Runtime via YUM, run the following command based on your n
|
||||
|
||||
sudo yum autoremove openvino-2022.3.0
|
||||
|
||||
@endsphinxdirective
|
||||
|
||||
## What's Next?
|
||||
What's Next?
|
||||
#############
|
||||
|
||||
@sphinxdirective
|
||||
|
||||
Now that you've installed OpenVINO Runtime, you're ready to run your own machine learning applications! Learn more about how to integrate a model in OpenVINO applications by trying out the following tutorials:
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ For example, to install and configure the components for working with TensorFlow
|
||||
|
||||
## What's in the Package?
|
||||
|
||||
> **NOTE**: The openvino-dev package installs [OpenVINO™ Runtime](https://pypi.org/project/openvino) as a dependency, which is the engine that runs the deep learning model and includes a set of libraries for an easy inference integration into your applications.
|
||||
> **NOTE**: The openvino-dev package installs [OpenVINO™ Runtime](https://pypi.org/project/openvino/2022.3.1/) as a dependency, which is the engine that runs the deep learning model and includes a set of libraries for an easy inference integration into your applications.
|
||||
|
||||
**In addition, the openvino-dev package installs the following components by default:**
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ repo_owner = "openvinotoolkit"
|
||||
|
||||
repo_name = "openvino_notebooks"
|
||||
|
||||
repo_branch = "tree/main"
|
||||
|
||||
artifacts_link = "http://repository.toolbox.iotg.sclab.intel.com/projects/ov-notebook/0.1.0-latest/20230517220809/dist/rst_files/"
|
||||
|
||||
blacklisted_extensions = ['.xml', '.bin']
|
||||
@@ -34,7 +36,7 @@ To run without installing anything, click the launch binder button.
|
||||
|
||||
.. |github_link| raw:: html
|
||||
|
||||
<a href="https://github.com/{{ owner }}/{{ repo }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
|
||||
<a href="https://github.com/{{ owner }}/{{ repo }}/{{ branch }}/{{ folder }}/{{ notebook }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
|
||||
|
||||
\n
|
||||
"""
|
||||
@@ -50,7 +52,7 @@ See the |installation_link| for instructions to run this tutorial locally on Win
|
||||
|
||||
.. |github_link| raw:: html
|
||||
|
||||
<a href="https://github.com/{{ owner }}/{{ repo }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
|
||||
<a href="https://github.com/{{ owner }}/{{ repo }}/{{ branch }}/{{ folder }}/{{ notebook }}" target="_blank"><img src="https://badgen.net/badge/icon/github?icon=github&label" alt="Github"></a>
|
||||
|
||||
\n
|
||||
"""
|
||||
|
||||
@@ -16,6 +16,7 @@ from consts import (
|
||||
no_binder_template,
|
||||
repo_directory,
|
||||
repo_name,
|
||||
repo_branch,
|
||||
repo_owner,
|
||||
rst_template,
|
||||
section_names,
|
||||
@@ -96,6 +97,7 @@ class NbProcessor:
|
||||
"owner": repo_owner,
|
||||
"repo": repo_name,
|
||||
"folder": repo_directory,
|
||||
"branch": repo_branch,
|
||||
}
|
||||
|
||||
def fetch_binder_list(self, file_format: str = 'txt') -> list:
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
import xml.etree.ElementTree as ET
|
||||
from sphinx_sitemap import setup as base_setup, get_locales, hreflang_formatter
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_config_value(
|
||||
'ov_sitemap_urlset',
|
||||
default=None,
|
||||
rebuild=''
|
||||
)
|
||||
|
||||
app.add_config_value(
|
||||
'ov_sitemap_meta',
|
||||
default=None,
|
||||
rebuild=''
|
||||
)
|
||||
|
||||
setup = base_setup(app)
|
||||
for listener in app.events.listeners['build-finished']:
|
||||
if listener.handler.__name__ == 'create_sitemap':
|
||||
app.disconnect(listener.id)
|
||||
|
||||
app.connect('build-finished', create_sitemap)
|
||||
return setup
|
||||
|
||||
|
||||
def create_sitemap(app, exception):
|
||||
"""Generates the sitemap.xml from the collected HTML page links"""
|
||||
|
||||
urlset = app.builder.config.ov_sitemap_urlset
|
||||
meta = app.builder.config.ov_sitemap_meta
|
||||
|
||||
site_url = app.builder.config.site_url or app.builder.config.html_baseurl
|
||||
site_url = site_url.rstrip('/') + '/'
|
||||
if not site_url:
|
||||
print("sphinx-sitemap error: neither html_baseurl nor site_url "
|
||||
"are set in conf.py. Sitemap not built.")
|
||||
return
|
||||
if (not app.sitemap_links):
|
||||
print("sphinx-sitemap warning: No pages generated for %s" %
|
||||
app.config.sitemap_filename)
|
||||
return
|
||||
|
||||
ET.register_namespace('xhtml', "http://www.w3.org/1999/xhtml")
|
||||
|
||||
root = ET.Element("urlset")
|
||||
|
||||
if not urlset:
|
||||
root.set("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9")
|
||||
else:
|
||||
for item in urlset:
|
||||
root.set(*item)
|
||||
|
||||
get_locales(app, exception)
|
||||
|
||||
if app.builder.config.version:
|
||||
version = app.builder.config.version + '/'
|
||||
else:
|
||||
version = ""
|
||||
|
||||
for link in app.sitemap_links:
|
||||
url = ET.SubElement(root, "url")
|
||||
scheme = app.config.sitemap_url_scheme
|
||||
if app.builder.config.language:
|
||||
lang = app.builder.config.language + '/'
|
||||
else:
|
||||
lang = ""
|
||||
|
||||
ET.SubElement(url, "loc").text = site_url + scheme.format(
|
||||
lang=lang, version=version, link=link
|
||||
)
|
||||
|
||||
if meta:
|
||||
for entry in meta:
|
||||
namespace, values = entry
|
||||
namespace_element = ET.SubElement(url, namespace)
|
||||
for tag_name, tag_value in values.items():
|
||||
ET.SubElement(namespace_element, tag_name).text = tag_value
|
||||
|
||||
if len(app.locales) > 0:
|
||||
for lang in app.locales:
|
||||
lang = lang + '/'
|
||||
linktag = ET.SubElement(
|
||||
url,
|
||||
"{http://www.w3.org/1999/xhtml}link"
|
||||
)
|
||||
linktag.set("rel", "alternate")
|
||||
linktag.set("hreflang", hreflang_formatter(lang.rstrip('/')))
|
||||
linktag.set("href", site_url + scheme.format(
|
||||
lang=lang, version=version, link=link
|
||||
))
|
||||
|
||||
filename = app.outdir + "/" + app.config.sitemap_filename
|
||||
ET.ElementTree(root).write(filename,
|
||||
xml_declaration=True,
|
||||
encoding='utf-8',
|
||||
method="xml")
|
||||
print("%s was generated for URL %s in %s" % (app.config.sitemap_filename,
|
||||
site_url, filename))
|
||||
@@ -0,0 +1,13 @@
|
||||
[build-system]
|
||||
requires = ["setuptools"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "openvino_custom_sphinx_sitemap"
|
||||
version = "0.0.1"
|
||||
description = "Extends sphinx-sitemap plugin with additional sitemap metadata"
|
||||
dependencies = [
|
||||
"sphinx >= 4.5.0",
|
||||
"sphinx-sitemap >= 2.2.0"
|
||||
]
|
||||
requires-python = ">=3.7"
|
||||
@@ -0,0 +1,9 @@
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
setup(
|
||||
name="openvino_custom_sphinx_sitemap",
|
||||
version="0.0.1",
|
||||
install_requires=['sphinx>=4.5.0', 'sphinx-sitemap>=2.2.0'],
|
||||
packages=['openvino_custom_sphinx_sitemap'],
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
<footer class="footer mt-5 mt-md-0">
|
||||
</footer>
|
||||
@@ -1,7 +0,0 @@
|
||||
<p>
|
||||
<a href="https://www.intel.com/content/www/us/en/homepage.html" alt="Intel" style="color: #000;">©2023 Intel Corporation</a>
|
||||
<a href="https://www.intel.com/content/www/us/en/legal/terms-of-use.html" alt="terms of use">Terms of Use</a>
|
||||
<a href="https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html" data-cookie-notice="true" alt="cookies policy">Cookies</a>
|
||||
<a href="https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html" alt="Privacy">Privacy</a>
|
||||
</p>
|
||||
<p style="font-size: 0.8em">Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p>
|
||||
@@ -1,16 +1,6 @@
|
||||
<form style="padding: 0 0.5rem;" class="d-flex align-items-center" action="{{ pathto('search') }}" method="get">
|
||||
<div style="width:100%;" class="textfield textfield-q textfield-size-m left-slot">
|
||||
<div class="slot left-slot-container">
|
||||
<span class="icon fas fa-search"></span>
|
||||
</div>
|
||||
<input
|
||||
class="input input-quiet input-size-m"
|
||||
type="search"
|
||||
name="q"
|
||||
id="search-input"
|
||||
placeholder="{{ _(theme_search_bar_text) }}"
|
||||
aria-label="{{ theme_search_bar_text }}"
|
||||
autocomplete="off"
|
||||
>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
<atomic-search-interface id="sa-search">
|
||||
<atomic-search-box redirection-url="search.html">
|
||||
</atomic-search-box>
|
||||
</atomic-search-interface>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@ atomicwrites==1.4.0
|
||||
attrs==22.1.0
|
||||
Babel==2.9.1
|
||||
beautifulsoup4==4.9.3
|
||||
certifi==2020.12.5
|
||||
certifi==2023.7.22
|
||||
colorama==0.4.4
|
||||
Cython==0.29.23
|
||||
docutils==0.16
|
||||
@@ -11,7 +11,7 @@ idna==2.10
|
||||
imagesize==1.2.0
|
||||
importlib-metadata==4.4.0
|
||||
iniconfig==1.1.1
|
||||
ipython==8.5.0
|
||||
ipython==8.10.0
|
||||
Jinja2==2.11.3
|
||||
lxml>=4.6.5
|
||||
MarkupSafe==1.1.1
|
||||
@@ -20,14 +20,14 @@ packaging==20.9
|
||||
pluggy==0.13.1
|
||||
py==1.10.0
|
||||
pydata-sphinx-theme==0.7.2
|
||||
Pygments==2.8.1
|
||||
Pygments==2.15.1
|
||||
pyparsing==2.4.7
|
||||
pytest==6.2.5
|
||||
pytest-html==3.1.1
|
||||
pytest-metadata==1.11.0
|
||||
py>=1.9.0
|
||||
pytz==2021.1
|
||||
requests==2.25.1
|
||||
requests==2.31.0
|
||||
six==1.15.0
|
||||
snowballstemmer==2.1.0
|
||||
soupsieve==2.2.1
|
||||
@@ -44,5 +44,5 @@ sphinxcontrib-jsmath==1.0.1
|
||||
sphinxcontrib-qthelp==1.0.3
|
||||
sphinxcontrib-serializinghtml==1.1.5
|
||||
toml==0.10.2
|
||||
urllib3==1.26.5
|
||||
urllib3==1.26.18
|
||||
zipp==3.4.1
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
# D100 - Missing docstring in public module
|
||||
# D101 - Missing docstring in public class
|
||||
# D103 - Missing docstring in public function
|
||||
# VNE001 - Single letter variable names are not allowed
|
||||
filename = *.py
|
||||
max-line-length = 160
|
||||
ignore = E203,D100,D101,D103
|
||||
ignore = E203,D100,D101,D103,VNE001
|
||||
max-parameters-amount = 8
|
||||
show_source = True
|
||||
docstring-convention = google
|
||||
|
||||
@@ -224,13 +224,13 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
|
||||
elif [ "$os" == "centos8" ] || [ "$os" == "rhel8" ] || [ "$os" == "almalinux8.7" ] ; then
|
||||
pkgs_core+=(
|
||||
https://vault.centos.org/centos/8/AppStream/$arch/os/Packages/tbb-2018.2-9.el8.$arch.rpm
|
||||
https://download-ib01.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/p/pugixml-1.13-1.el8.$arch.rpm
|
||||
https://dl.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/p/pugixml-1.13-1.el8.$arch.rpm
|
||||
https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-2.1.2-6.el8.$arch.rpm
|
||||
)
|
||||
pkgs_python+=(python38 python38-pip)
|
||||
pkgs_dev+=(
|
||||
https://vault.centos.org/centos/8/PowerTools/$arch/os/Packages/gflags-devel-2.1.2-6.el8.$arch.rpm
|
||||
https://download-ib01.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/j/json-devel-3.6.1-2.el8.$arch.rpm
|
||||
https://dl.fedoraproject.org/pub/epel/8/Everything/$arch/Packages/j/json-devel-3.6.1-2.el8.$arch.rpm
|
||||
)
|
||||
pkgs_opencv_req=(gtk3)
|
||||
pkgs_opencv_opt=(
|
||||
@@ -272,11 +272,11 @@ elif [ "$os" == "centos7" ] || [ "$os" == "centos8" ] ||
|
||||
elif [ "$os" == "rhel9.1" ] ; then
|
||||
pkgs_core=(
|
||||
http://mirror.stream.centos.org/9-stream/AppStream/$arch/os/Packages/tbb-2020.3-8.el9.$arch.rpm
|
||||
https://download-ib01.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/p/pugixml-1.13-1.el9.$arch.rpm
|
||||
https://download-ib01.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-2.2.2-9.el9.$arch.rpm
|
||||
https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/p/pugixml-1.13-1.el9.$arch.rpm
|
||||
https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-2.2.2-9.el9.$arch.rpm
|
||||
)
|
||||
pkgs_python=(python3 python3-pip)
|
||||
pkgs_dev+=(https://download-ib01.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-devel-2.2.2-9.el9.$arch.rpm)
|
||||
pkgs_dev+=(https://dl.fedoraproject.org/pub/epel/9/Everything/$arch/Packages/g/gflags-devel-2.2.2-9.el9.$arch.rpm)
|
||||
extra_repos+=(https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm)
|
||||
fi
|
||||
elif [ "$os" == "opensuse-leap15.3" ] ; then
|
||||
|
||||
@@ -87,7 +87,7 @@ if [ -e "$INSTALLDIR/runtime" ]; then
|
||||
fi
|
||||
|
||||
if [ -e "$INSTALLDIR/tools/compile_tool" ]; then
|
||||
export LD_LIBRARY_PATH=$INSTALLDIR/tools/compile_tool${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
|
||||
export PATH=$INSTALLDIR/tools/compile_tool${PATH:+:$PATH}
|
||||
fi
|
||||
|
||||
# OpenCV environment
|
||||
|
||||
@@ -45,7 +45,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets
|
||||
ARCHIVE DESTINATION ${OV_CPACK_ARCHIVEDIR} COMPONENT ${OV_CPACK_COMP_CORE_C}
|
||||
LIBRARY DESTINATION ${OV_CPACK_LIBRARYDIR} COMPONENT ${OV_CPACK_COMP_CORE_C}
|
||||
NAMELINK_COMPONENT ${OV_CPACK_COMP_CORE_C_DEV}
|
||||
INCLUDES DESTINATION ${OV_CPACK_INCLUDEDIR})
|
||||
INCLUDES DESTINATION ${OV_CPACK_INCLUDEDIR}
|
||||
${OV_CPACK_INCLUDEDIR}/ie)
|
||||
|
||||
install(DIRECTORY ${OpenVINO_C_API_SOURCE_DIR}/include/c_api
|
||||
DESTINATION ${OV_CPACK_INCLUDEDIR}/ie
|
||||
|
||||
@@ -127,21 +127,10 @@ TEST(ie_core_register_plugin, registerPlugin) {
|
||||
IE_ASSERT_OK(ie_core_create("", &core));
|
||||
ASSERT_NE(nullptr, core);
|
||||
|
||||
ie_network_t *network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_read_network(core, xml, bin, &network));
|
||||
EXPECT_NE(nullptr, network);
|
||||
|
||||
const char *plugin_name = "openvino_intel_cpu_plugin";
|
||||
const char *plugin_name = "test_plugin";
|
||||
const char *device_name = "BLA";
|
||||
IE_EXPECT_OK(ie_core_register_plugin(core, plugin_name, device_name));
|
||||
|
||||
ie_config_t config = {nullptr, nullptr, nullptr};
|
||||
ie_executable_network_t *exe_network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_load_network(core, network, device_name, &config, &exe_network));
|
||||
EXPECT_NE(nullptr, exe_network);
|
||||
|
||||
ie_exec_network_free(&exe_network);
|
||||
ie_network_free(&network);
|
||||
ie_core_free(&core);
|
||||
}
|
||||
|
||||
@@ -150,43 +139,24 @@ TEST(ie_core_register_plugins, registerPlugins) {
|
||||
IE_ASSERT_OK(ie_core_create("", &core));
|
||||
ASSERT_NE(nullptr, core);
|
||||
|
||||
ie_network_t *network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_read_network(core, xml, bin, &network));
|
||||
EXPECT_NE(nullptr, network);
|
||||
|
||||
IE_EXPECT_OK(ie_core_register_plugins(core, plugins_xml));
|
||||
|
||||
ie_config_t config = {nullptr, nullptr, nullptr};
|
||||
const char *device_name = "CUSTOM";
|
||||
ie_executable_network_t *exe_network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_load_network(core, network, device_name, &config, &exe_network));
|
||||
EXPECT_NE(nullptr, exe_network);
|
||||
|
||||
ie_exec_network_free(&exe_network);
|
||||
ie_network_free(&network);
|
||||
ie_core_free(&core);
|
||||
}
|
||||
|
||||
TEST(ie_core_unregister_plugin, unregisterPlugin) {
|
||||
TEST(ie_core_unload_plugin, unloadPlugin) {
|
||||
ie_core_t *core = nullptr;
|
||||
IE_ASSERT_OK(ie_core_create(plugins_xml, &core));
|
||||
IE_ASSERT_OK(ie_core_create("", &core));
|
||||
ASSERT_NE(nullptr, core);
|
||||
|
||||
ie_network_t *network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_read_network(core, xml, bin, &network));
|
||||
EXPECT_NE(nullptr, network);
|
||||
|
||||
ie_config_t config = {nullptr, nullptr, nullptr};
|
||||
const char *device_name = "CUSTOM";
|
||||
ie_executable_network_t *exe_network = nullptr;
|
||||
IE_EXPECT_OK(ie_core_load_network(core, network, device_name, &config, &exe_network));
|
||||
EXPECT_NE(nullptr, exe_network);
|
||||
|
||||
ie_exec_network_free(&exe_network);
|
||||
ie_network_free(&network);
|
||||
|
||||
const char *device_name = "CPU";
|
||||
ie_core_versions_t versions = {0};
|
||||
// Trigger plugin loading
|
||||
IE_EXPECT_OK(ie_core_get_versions(core, device_name, &versions));
|
||||
// Unload plugin
|
||||
IE_EXPECT_OK(ie_core_unregister_plugin(core, device_name));
|
||||
|
||||
ie_core_versions_free(&versions);
|
||||
ie_core_free(&core);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,5 +35,5 @@ radon
|
||||
retrying
|
||||
tox
|
||||
types-pkg_resources
|
||||
wheel>=0.38.1
|
||||
wheel>=0.38.1,<=0.41.0
|
||||
protobuf~=3.18.1
|
||||
|
||||
@@ -22,7 +22,7 @@ endif()
|
||||
include (cmake/UseCython.cmake)
|
||||
|
||||
# Check Cython version
|
||||
if(CYTHON_VERSION VERSION_LESS "0.29")
|
||||
if(CYTHON_VERSION VERSION_LESS 0.29)
|
||||
message(FATAL_ERROR "OpenVINO Python API needs at least Cython version 0.29, found version ${CYTHON_VERSION}")
|
||||
else()
|
||||
message(STATUS "Found Cython version ${CYTHON_VERSION}")
|
||||
|
||||
@@ -50,7 +50,30 @@ include( FindPackageHandleStandardArgs )
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )
|
||||
|
||||
# Find Cython version
|
||||
execute_process(COMMAND ${CYTHON_EXECUTABLE} -V ERROR_VARIABLE CYTHON_OUTPUT OUTPUT_QUIET)
|
||||
string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}")
|
||||
execute_process(COMMAND ${CYTHON_EXECUTABLE} -V
|
||||
ERROR_VARIABLE CYTHON_OUTPUT
|
||||
OUTPUT_VARIABLE CYTHON_ERROR_MESSAGE
|
||||
RESULT_VARIABLE CYTHON_EXIT_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(CYTHON_EXIT_CODE EQUAL 0)
|
||||
if(NOT CYTHON_OUTPUT)
|
||||
set(CYTHON_OUTPUT "${CYTHON_ERROR_MESSAGE}")
|
||||
endif()
|
||||
string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+(\\.[0-9]+)?).*" "\\1" CYTHON_VERSION "${CYTHON_OUTPUT}")
|
||||
else()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
|
||||
set(CYTHON_MESSAGE_MODE TRACE)
|
||||
endif()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
||||
set(CYTHON_MESSAGE_MODE FATAL_ERROR)
|
||||
endif()
|
||||
message(${CYTHON_MESSAGE_MODE} "Failed to detect cython version: ${CYTHON_ERROR_MESSAGE}")
|
||||
unset(CYTHON_MESSAGE_MODE)
|
||||
endif()
|
||||
|
||||
unset(CYTHON_OUTPUT)
|
||||
unset(CYTHON_EXIT_CODE)
|
||||
unset(CYTHON_ERROR_MESSAGE)
|
||||
|
||||
mark_as_advanced( CYTHON_EXECUTABLE CYTHON_VERSION )
|
||||
|
||||
@@ -21,9 +21,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
# 'argument': conversion from 'size_t' to 'int', possible loss of data
|
||||
ie_add_compiler_flags(/wd4267)
|
||||
ie_add_compiler_flags(/wd4244)
|
||||
ie_add_compiler_flags(/wd4551)
|
||||
endif()
|
||||
if (OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wno-undef)
|
||||
if(OV_COMPILER_IS_CLANG)
|
||||
ie_add_compiler_flags(-Wno-parentheses-equality)
|
||||
endif()
|
||||
endif()
|
||||
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
|
||||
ie_add_compiler_flags(-Wno-unused-but-set-variable)
|
||||
|
||||
@@ -4,4 +4,5 @@ pytest==7.2.0; python_version >= '3.10'
|
||||
py>=1.9.0
|
||||
attrs==22.1.0
|
||||
pytest-html==1.19.0
|
||||
cython>=0.29.32
|
||||
cython>=0.29.32
|
||||
g
|
||||
@@ -32,9 +32,13 @@ void regclass_CompiledModel(py::module m) {
|
||||
"create_infer_request",
|
||||
[](ov::CompiledModel& self) {
|
||||
// Create temporary ov::InferRequest and move it to actual wrapper class.
|
||||
return std::make_shared<InferRequestWrapper>(self.create_infer_request(), self.inputs(), self.outputs());
|
||||
ov::InferRequest request;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
request = self.create_infer_request();
|
||||
}
|
||||
return std::make_shared<InferRequestWrapper>(std::move(request), self.inputs(), self.outputs());
|
||||
},
|
||||
py::call_guard<py::gil_scoped_release>(),
|
||||
R"(
|
||||
Creates an inference request object used to infer the compiled model.
|
||||
The created request has allocated input and output tensors.
|
||||
|
||||
@@ -369,7 +369,7 @@ def test_split_1d():
|
||||
|
||||
|
||||
def test_depth_to_space():
|
||||
b, c, h, w = shape = (2, 8, 3, 3)
|
||||
b, c, h, w = shape = (2, 8, 3, 3) # noqa: VNE001
|
||||
blocksize = 2
|
||||
data = np.random.random_sample(shape).astype(np.float32)
|
||||
tmp = np.reshape(data, [b, blocksize, blocksize, c // (blocksize ** 2), h, w])
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import pytest
|
||||
import sys
|
||||
import numpy as np
|
||||
import os
|
||||
from pathlib import Path
|
||||
@@ -28,7 +29,6 @@ from tests.test_utils.test_utils import (
|
||||
generate_image,
|
||||
generate_relu_compiled_model,
|
||||
get_relu_model,
|
||||
generate_lib_name,
|
||||
plugins_path,
|
||||
)
|
||||
|
||||
@@ -257,43 +257,40 @@ def test_query_model(device):
|
||||
|
||||
|
||||
@pytest.mark.dynamic_library()
|
||||
def test_register_plugin(device):
|
||||
def test_register_plugin():
|
||||
device = "TEST_DEVICE"
|
||||
lib_name = "test_plugin"
|
||||
full_lib_name = lib_name + ".dll" if sys.platform == "win32" else "lib" + lib_name + ".so"
|
||||
|
||||
core = Core()
|
||||
full_device_name = core.get_property(device, "FULL_DEVICE_NAME")
|
||||
lib_name = generate_lib_name(device, full_device_name)
|
||||
core.register_plugin(lib_name, "BLA")
|
||||
model = core.read_model(model=test_net_xml, weights=test_net_bin)
|
||||
compiled_model = core.compile_model(model, "BLA")
|
||||
assert isinstance(compiled_model, CompiledModel), "Cannot load the network to the registered plugin with name 'BLA'"
|
||||
core.register_plugin(lib_name, device)
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
core.get_versions(device)
|
||||
assert f"Cannot load library '{full_lib_name}'" in str(e.value)
|
||||
|
||||
|
||||
@pytest.mark.dynamic_library()
|
||||
def test_register_plugins(device):
|
||||
def test_register_plugins():
|
||||
device = "TEST_DEVICE"
|
||||
lib_name = "test_plugin"
|
||||
full_lib_name = lib_name + ".dll" if sys.platform == "win32" else "lib" + lib_name + ".so"
|
||||
plugins_xml = plugins_path(device, full_lib_name)
|
||||
|
||||
core = Core()
|
||||
full_device_name = core.get_property(device, "FULL_DEVICE_NAME")
|
||||
plugins_xml = plugins_path(device, full_device_name)
|
||||
core.register_plugins(plugins_xml)
|
||||
model = core.read_model(model=test_net_xml, weights=test_net_bin)
|
||||
compiled_model = core.compile_model(model, "CUSTOM")
|
||||
os.remove(plugins_xml)
|
||||
assert isinstance(compiled_model, CompiledModel), (
|
||||
"Cannot load the network to "
|
||||
"the registered plugin with name 'CUSTOM' "
|
||||
"registered in the XML file"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Need to figure out if it's expected behaviour (fails with C++ API as well")
|
||||
def test_unregister_plugin(device):
|
||||
core = Core()
|
||||
core.unload_plugin(device)
|
||||
model = core.read_model(model=test_net_xml, weights=test_net_bin)
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
core.load_network(model, device)
|
||||
assert (
|
||||
f"Device with '{device}' name is not registered in the OpenVINO Runtime"
|
||||
in str(e.value)
|
||||
)
|
||||
core.get_versions(device)
|
||||
assert f"Cannot load library '{full_lib_name}'" in str(e.value)
|
||||
|
||||
|
||||
def test_unload_plugin(device):
|
||||
core = Core()
|
||||
# Trigger plugin loading
|
||||
core.get_versions(device)
|
||||
# Unload plugin
|
||||
core.unload_plugin(device)
|
||||
|
||||
|
||||
@pytest.mark.template_plugin()
|
||||
|
||||
@@ -10,7 +10,6 @@ import numpy as np
|
||||
import pytest
|
||||
|
||||
from pathlib import Path
|
||||
from platform import processor
|
||||
|
||||
import openvino
|
||||
import openvino.runtime.opset8 as ops
|
||||
@@ -28,30 +27,10 @@ def test_compare_models():
|
||||
print("openvino.test_utils.compare_models is not available") # noqa: T201
|
||||
|
||||
|
||||
def generate_lib_name(device, full_device_name):
|
||||
lib_name = ""
|
||||
arch = processor()
|
||||
if arch == "x86_64" or "Intel" in full_device_name or device in ["GNA", "HDDL", "MYRIAD", "VPUX"]:
|
||||
lib_name = "openvino_intel_" + device.lower() + "_plugin"
|
||||
elif arch != "x86_64" and device == "CPU":
|
||||
lib_name = "openvino_arm_cpu_plugin"
|
||||
elif device in ["HETERO", "MULTI", "AUTO"]:
|
||||
lib_name = "openvino_" + device.lower() + "_plugin"
|
||||
return lib_name
|
||||
|
||||
|
||||
def plugins_path(device, full_device_name):
|
||||
lib_name = generate_lib_name(device, full_device_name)
|
||||
full_lib_name = ""
|
||||
|
||||
if sys.platform == "win32":
|
||||
full_lib_name = lib_name + ".dll"
|
||||
else:
|
||||
full_lib_name = "lib" + lib_name + ".so"
|
||||
|
||||
def plugins_path(device, lib_path):
|
||||
plugin_xml = f"""<ie>
|
||||
<plugins>
|
||||
<plugin location="{full_lib_name}" name="CUSTOM">
|
||||
<plugin location="{lib_path}" name="{device}">
|
||||
</plugin>
|
||||
</plugins>
|
||||
</ie>"""
|
||||
|
||||
@@ -85,16 +85,16 @@ def test_query_network(device):
|
||||
|
||||
|
||||
@pytest.mark.dynamic_library
|
||||
@pytest.mark.skipif(os.environ.get("TEST_DEVICE", "CPU") != "CPU", reason="Device dependent test")
|
||||
def test_register_plugin():
|
||||
ie = IECore()
|
||||
if ie.get_metric("CPU", "FULL_DEVICE_NAME") == "arm_compute::NEON":
|
||||
pytest.skip("Can't run on ARM plugin due-to openvino_intel_cpu_plugin specific test")
|
||||
ie.register_plugin("openvino_intel_cpu_plugin", "BLA")
|
||||
net = ie.read_network(model=test_net_xml, weights=test_net_bin)
|
||||
exec_net = ie.load_network(net, "BLA")
|
||||
assert isinstance(exec_net, ExecutableNetwork), "Cannot load the network to the registered plugin with name 'BLA'"
|
||||
device = "TEST_DEVICE"
|
||||
lib_name = "test_plugin"
|
||||
full_lib_name = lib_name + ".dll" if sys.platform == "win32" else "lib" + lib_name + ".so"
|
||||
|
||||
ie = IECore()
|
||||
ie.register_plugin(lib_name, device)
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
ie.get_versions(device)
|
||||
assert f"Cannot load library '{full_lib_name}'" in str(e.value)
|
||||
|
||||
@pytest.mark.dynamic_library
|
||||
def test_register_plugins():
|
||||
@@ -119,17 +119,15 @@ def test_register_plugins():
|
||||
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
ie.get_versions(device)
|
||||
assert f"Cannot load library '{full_lib_name}" in str(e.value)
|
||||
assert f"Cannot load library '{full_lib_name}'" in str(e.value)
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Need to figure out if it's expected behaviour (fails with C++ API as well")
|
||||
def test_unregister_plugin(device):
|
||||
def test_unload_plugin(device):
|
||||
ie = IECore()
|
||||
# Trigger plugin loading
|
||||
ie.get_versions(device)
|
||||
# Unload plugin
|
||||
ie.unregister_plugin(device)
|
||||
net = ie.read_network(model=test_net_xml, weights=test_net_bin)
|
||||
with pytest.raises(RuntimeError) as e:
|
||||
ie.load_network(net, device)
|
||||
assert f"Device with '{device}' name is not registered in the OpenVINO Runtime" in str(e.value)
|
||||
|
||||
|
||||
def test_available_devices(device):
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
setuptools>=65.6.1
|
||||
wheel>=0.38.1
|
||||
wheel>=0.38.1,<=0.41.0
|
||||
patchelf<=0.17.2.1; sys_platform == 'linux' and platform_machine == 'x86_64'
|
||||
|
||||
@@ -33,6 +33,9 @@ add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
|
||||
add_library(openvino::util ALIAS ${TARGET_NAME})
|
||||
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${CMAKE_DL_LIBS})
|
||||
if (WIN32)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE Shlwapi)
|
||||
endif()
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
$<BUILD_INTERFACE:${UTIL_INCLUDE_DIR}>)
|
||||
|
||||
|
||||
@@ -97,9 +97,18 @@ std::string get_file_name(const std::string& path);
|
||||
* @brief Interface function to get absolute path of file
|
||||
* @param path - path to file, can be relative to current working directory
|
||||
* @return Absolute path of file
|
||||
* @throw runtime_error if any error occurred
|
||||
* @throw runtime_error if absolute path can't be resolved
|
||||
*/
|
||||
std::string get_absolute_file_path(const std::string& path);
|
||||
|
||||
/**
|
||||
* @brief Interface function to check path to file is absolute or not
|
||||
* @param path - path to file, can be relative to current working directory
|
||||
* @return True if path is absolute and False otherwise
|
||||
* @throw runtime_error if any error occurred
|
||||
*/
|
||||
bool is_absolute_file_path(const std::string& path);
|
||||
|
||||
/**
|
||||
* @brief Interface function to create directorty recursively by given path
|
||||
* @param path - path to file, can be relative to current working directory
|
||||
@@ -242,6 +251,26 @@ inline std::basic_string<C> make_plugin_library_name(const std::basic_string<C>&
|
||||
FileTraits<C>::library_ext();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Format plugin path (canonicalize, complete to absolute or complete to file name) for further
|
||||
* dynamic loading by OS
|
||||
* @param plugin - Path (absolute or relative) or name of a plugin. Depending on platform, `plugin` is wrapped with
|
||||
* shared library suffix and prefix to identify library full name
|
||||
* @return absolute path or file name with extension (to be found in ENV)
|
||||
*/
|
||||
FilePath get_plugin_path(const std::string& plugin);
|
||||
|
||||
/**
|
||||
* @brief Format plugin path (canonicalize, complete to absolute or complete to file name) for further
|
||||
* dynamic loading by OS
|
||||
* @param plugin - Path (absolute or relative) or name of a plugin. Depending on platform, `plugin` is wrapped with
|
||||
* shared library suffix and prefix to identify library full name
|
||||
* @param xml_path - Path (absolute or relative) to XML configuration file
|
||||
* @param as_abs_only - Bool value, allows return file names or not
|
||||
* @return absolute path or file name with extension (to be found in ENV)
|
||||
*/
|
||||
FilePath get_plugin_path(const std::string& plugin, const std::string& xml_path, bool as_abs_only = false);
|
||||
|
||||
/**
|
||||
* @brief load binary data from file
|
||||
* @param path - binary file path to load
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
# endif
|
||||
# include <Shlwapi.h>
|
||||
# include <direct.h>
|
||||
# include <windows.h>
|
||||
/// @brief Max length of absolute file path
|
||||
@@ -351,14 +352,26 @@ std::wstring ov::util::string_to_wstring(const std::string& string) {
|
||||
std::string ov::util::get_absolute_file_path(const std::string& path) {
|
||||
std::string absolutePath;
|
||||
absolutePath.resize(MAX_ABS_PATH);
|
||||
auto absPath = get_absolute_path(&absolutePath[0], path);
|
||||
if (!absPath) {
|
||||
std::stringstream ss;
|
||||
ss << "Can't get absolute file path for [" << path << "], err = " << strerror(errno);
|
||||
throw std::runtime_error(ss.str());
|
||||
std::ignore = get_absolute_path(&absolutePath[0], path);
|
||||
if (!absolutePath.empty()) {
|
||||
// on Linux if file does not exist or no access, function will return NULL, but
|
||||
// `absolutePath` will contain resolved path
|
||||
absolutePath.resize(absolutePath.find('\0'));
|
||||
return std::string(absolutePath);
|
||||
}
|
||||
absolutePath.resize(strlen(absPath));
|
||||
return absolutePath;
|
||||
std::stringstream ss;
|
||||
ss << "Can't get absolute file path for [" << path << "], err = " << strerror(errno);
|
||||
throw std::runtime_error(ss.str());
|
||||
}
|
||||
|
||||
bool ov::util::is_absolute_file_path(const std::string& path) {
|
||||
if (path.empty())
|
||||
throw std::runtime_error("Provided path is empty");
|
||||
#ifdef _WIN32
|
||||
return !PathIsRelativeA(path.c_str());
|
||||
#else
|
||||
return path[0] == '/';
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
void ov::util::create_directory_recursive(const std::string& path) {
|
||||
@@ -458,6 +471,64 @@ std::wstring ov::util::get_ov_lib_path_w() {
|
||||
|
||||
#endif // OPENVINO_ENABLE_UNICODE_PATH_SUPPORT
|
||||
|
||||
ov::util::FilePath ov::util::get_plugin_path(const std::string& plugin) {
|
||||
// Assume `plugin` may contain:
|
||||
// 1. /path/to/libexample.so absolute path
|
||||
// 2. ../path/to/libexample.so path relative to working directory
|
||||
// 3. example library name - to be converted to 4th case
|
||||
// 4. libexample.so - path relative to working directory (if exists) or file to be found in ENV
|
||||
|
||||
// For 1-2 cases
|
||||
if (plugin.find(FileTraits<char>::file_separator) != std::string::npos)
|
||||
return ov::util::to_file_path(ov::util::get_absolute_file_path(plugin));
|
||||
|
||||
auto lib_name = plugin;
|
||||
// For 3rd case - convert to 4th case
|
||||
if (!ov::util::ends_with(plugin, ov::util::FileTraits<char>::library_ext()))
|
||||
lib_name = ov::util::make_plugin_library_name({}, plugin);
|
||||
|
||||
// For 4th case
|
||||
auto lib_path = ov::util::to_file_path(ov::util::get_absolute_file_path(lib_name));
|
||||
if (ov::util::file_exists(lib_path))
|
||||
return lib_path;
|
||||
return ov::util::to_file_path(lib_name);
|
||||
}
|
||||
|
||||
ov::util::FilePath ov::util::get_plugin_path(const std::string& plugin, const std::string& xml_path, bool as_abs_only) {
|
||||
// Assume `plugin` (from XML "location" record) contains only:
|
||||
// 1. /path/to/libexample.so absolute path
|
||||
// 2. ../path/to/libexample.so path relative to XML directory
|
||||
// 3. example library name - to be converted to 4th case
|
||||
// 4. libexample.so - path relative to XML directory (if exists) or file to be found in ENV
|
||||
// (if `as_abs_only` is false)
|
||||
|
||||
// For 1st case
|
||||
if (ov::util::is_absolute_file_path(plugin))
|
||||
return ov::util::to_file_path(plugin);
|
||||
|
||||
auto xml_path_ = xml_path;
|
||||
if (xml_path.find(ov::util::FileTraits<char>::file_separator) == std::string::npos)
|
||||
xml_path_ = ov::util::path_join({std::string("."), xml_path}); // treat plugins.xml as CWD/plugins.xml
|
||||
|
||||
// For 2nd case
|
||||
if (plugin.find(ov::util::FileTraits<char>::file_separator) != std::string::npos) {
|
||||
auto path_ = ov::util::path_join({ov::util::get_directory(xml_path_), plugin});
|
||||
return ov::util::to_file_path(ov::util::get_absolute_file_path(path_)); // canonicalize path
|
||||
}
|
||||
|
||||
auto lib_file_name = plugin;
|
||||
// For 3rd case - convert to 4th case
|
||||
if (!ov::util::ends_with(plugin, ov::util::FileTraits<char>::library_ext()))
|
||||
lib_file_name = ov::util::make_plugin_library_name({}, plugin);
|
||||
|
||||
// For 4th case
|
||||
auto lib_path = ov::util::path_join({ov::util::get_directory(xml_path_), lib_file_name});
|
||||
lib_path = ov::util::get_absolute_file_path(lib_path); // canonicalize path
|
||||
if (as_abs_only || ov::util::file_exists(lib_path))
|
||||
return ov::util::to_file_path(lib_path);
|
||||
return ov::util::to_file_path(lib_file_name);
|
||||
}
|
||||
|
||||
std::vector<uint8_t> ov::util::load_binary(const std::string& path) {
|
||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
std::wstring widefilename = ov::util::string_to_wstring(path);
|
||||
|
||||
@@ -26,7 +26,7 @@ std::shared_ptr<void> load_shared_object(const char* path) {
|
||||
}};
|
||||
if (!shared_object) {
|
||||
std::stringstream ss;
|
||||
ss << "Cannot load library '" << path;
|
||||
ss << "Cannot load library '" << path << "'";
|
||||
if (auto error = dlerror()) {
|
||||
ss << ": " << error;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,8 @@ public:
|
||||
private:
|
||||
void loadPlaces();
|
||||
template <typename T>
|
||||
void loadConsts(const std::basic_string<T>& folder_with_weights, std::istream* weight_stream);
|
||||
void load_consts(const std::basic_string<T>& folder_with_weights);
|
||||
void load_consts(std::istream* weight_stream);
|
||||
void createTempConsts();
|
||||
std::vector<std::shared_ptr<OpPlace>> determine_cut_nodes() const;
|
||||
|
||||
@@ -156,16 +157,8 @@ void InputModel::InputModelImpl::loadPlaces() {
|
||||
|
||||
namespace {
|
||||
bool read_tensor(std::istream& is, char* data, size_t len) {
|
||||
std::vector<char> header(16);
|
||||
is.read(&header[0], 16);
|
||||
uint32_t dims_len = 0;
|
||||
is.read(reinterpret_cast<char*>(&dims_len), 4);
|
||||
std::vector<char> dims_struct(dims_len);
|
||||
is.read(&dims_struct[0], dims_len);
|
||||
is.read(data, len);
|
||||
if (is.gcount() != len)
|
||||
return false;
|
||||
return true;
|
||||
return (size_t)is.gcount() == len;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -182,6 +175,20 @@ std::basic_string<wchar_t> get_const_path(const std::basic_string<wchar_t>& fold
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
bool is_pdmodel(const std::basic_string<T>& path) {
|
||||
std::string ext = ".pdmodel";
|
||||
return ov::util::ends_with(path, ext);
|
||||
}
|
||||
|
||||
#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
|
||||
template <>
|
||||
bool is_pdmodel(const std::basic_string<wchar_t>& path) {
|
||||
std::wstring ext = L".pdmodel";
|
||||
return ov::util::ends_with(path, ext);
|
||||
}
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
std::basic_string<T> get_model_path(const std::basic_string<T>& path, std::ifstream* weights_stream) {
|
||||
std::string model_file{path};
|
||||
@@ -267,9 +274,9 @@ std::vector<std::shared_ptr<OpPlace>> InputModel::InputModelImpl::determine_cut_
|
||||
return new_op_places;
|
||||
}
|
||||
|
||||
// load_consts with folder is compatible with old PaddlePaddle API.
|
||||
template <typename T>
|
||||
void InputModel::InputModelImpl::loadConsts(const std::basic_string<T>& folder_with_weights,
|
||||
std::istream* weight_stream) {
|
||||
void InputModel::InputModelImpl::load_consts(const std::basic_string<T>& folder_with_weights) {
|
||||
for (const auto& item : m_var_places) {
|
||||
const auto& var_desc = item.second->get_desc();
|
||||
const auto& name = item.first;
|
||||
@@ -286,15 +293,78 @@ void InputModel::InputModelImpl::loadConsts(const std::basic_string<T>& folder_w
|
||||
std::vector<uint8_t> tensor_data(data_length);
|
||||
|
||||
bool read_succeed = false;
|
||||
if (weight_stream) {
|
||||
read_succeed = read_tensor(*weight_stream, reinterpret_cast<char*>(&tensor_data[0]), data_length);
|
||||
} else if (!folder_with_weights.empty()) {
|
||||
if (!folder_with_weights.empty()) {
|
||||
std::ifstream is(get_const_path(folder_with_weights, name), std::ios::in | std::ifstream::binary);
|
||||
FRONT_END_GENERAL_CHECK(is && is.is_open(), "Cannot open file for constant value.");
|
||||
const size_t header_size = 16;
|
||||
std::vector<char> header(header_size);
|
||||
is.read(&header[0], header_size);
|
||||
|
||||
uint32_t dims_len = 0;
|
||||
is.read(reinterpret_cast<char*>(&dims_len), 4);
|
||||
std::vector<char> dims_struct(dims_len);
|
||||
is.read(&dims_struct[0], dims_len);
|
||||
read_succeed = read_tensor(is, reinterpret_cast<char*>(&tensor_data[0]), data_length);
|
||||
} else {
|
||||
FRONT_END_GENERAL_CHECK(false, "Either folder with weights or stream must be provided.");
|
||||
FRONT_END_GENERAL_CHECK(false, "Folder with weights must be provided.");
|
||||
}
|
||||
FRONT_END_GENERAL_CHECK(read_succeed,
|
||||
"File containing constant with name ",
|
||||
name,
|
||||
" wasn't successfully read.");
|
||||
auto const_node = opset7::Constant::create(type, shape, &tensor_data[0]);
|
||||
const_node->set_friendly_name(name);
|
||||
m_tensor_values[name] = const_node;
|
||||
}
|
||||
}
|
||||
|
||||
// load_consts with stream is compatible with new PaddlePaddle API.
|
||||
void InputModel::InputModelImpl::load_consts(std::istream* weight_stream) {
|
||||
for (const auto& item : m_var_places) {
|
||||
const auto& var_desc = item.second->get_desc();
|
||||
const auto& name = item.first;
|
||||
if (ov::util::ends_with(name, std::string{"feed"}) || ov::util::ends_with(name, std::string{"fetch"}))
|
||||
continue;
|
||||
|
||||
// var_desc.persistable() is used to mark node const value or not.
|
||||
if (!var_desc.persistable())
|
||||
continue;
|
||||
|
||||
FRONT_END_GENERAL_CHECK(var_desc.type().type() == ::paddle::framework::proto::VarType::LOD_TENSOR);
|
||||
FRONT_END_GENERAL_CHECK(weight_stream != nullptr && weight_stream->peek() != EOF,
|
||||
"PaddlePaddle *.pdiparams format weight file doesn't exist!");
|
||||
/*
|
||||
reference:
|
||||
https://github.com/PaddlePaddle/Paddle2ONNX/blob/c14446437041a0aa3572994d085b7a35c5b0985c/paddle2onnx/parser/parser.cc#L261
|
||||
When deserialize the proto, the header of each weight
|
||||
[ 4 byte ] -- version(not need)
|
||||
[ 8 byte ] -- lod_level(not need)
|
||||
[ 4 byte ] -- version(not need)
|
||||
[ 4 byte ] -- TensorDesc size
|
||||
[ x byte ... ] -- TensorDesc
|
||||
[ y byte ... ] -- weight
|
||||
*/
|
||||
{
|
||||
const size_t header_size = 16;
|
||||
std::vector<char> header(header_size);
|
||||
weight_stream->read(&header[0], header_size);
|
||||
}
|
||||
|
||||
int32_t size;
|
||||
weight_stream->read(reinterpret_cast<char*>(&size), sizeof(size));
|
||||
|
||||
std::unique_ptr<char[]> buf(new char[size]);
|
||||
weight_stream->read(reinterpret_cast<char*>(buf.get()), size);
|
||||
|
||||
std::unique_ptr<::paddle::framework::proto::VarType_TensorDesc> tensor_desc(
|
||||
new ::paddle::framework::proto::VarType_TensorDesc());
|
||||
tensor_desc->ParseFromArray(buf.get(), size);
|
||||
Shape shape(tensor_desc->dims().cbegin(), tensor_desc->dims().cend());
|
||||
const auto& type = TYPE_MAP[tensor_desc->data_type()];
|
||||
const auto& data_length = shape_size(shape) * type.size();
|
||||
std::vector<uint8_t> tensor_data(data_length);
|
||||
|
||||
bool read_succeed = read_tensor(*weight_stream, reinterpret_cast<char*>(&tensor_data[0]), data_length);
|
||||
FRONT_END_GENERAL_CHECK(read_succeed,
|
||||
"File containing constant with name ",
|
||||
name,
|
||||
@@ -306,6 +376,14 @@ void InputModel::InputModelImpl::loadConsts(const std::basic_string<T>& folder_w
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
1. path: is a directory, compatible with old PaddlePaddle API.
|
||||
read __model__ as model stream.
|
||||
read the separate weights in the directory.
|
||||
2. path: is a pdmodel file, compatible with new PaddlePaddle API.
|
||||
read *.pdmodel as model stream.
|
||||
read *.pdiparam as weight stream.
|
||||
*/
|
||||
template <typename T>
|
||||
InputModel::InputModelImpl::InputModelImpl(const std::basic_string<T>& path,
|
||||
const InputModel& input_model,
|
||||
@@ -328,10 +406,10 @@ InputModel::InputModelImpl::InputModelImpl(const std::basic_string<T>& path,
|
||||
version >= 2000000 || version == 0,
|
||||
"[Frontend]Only Support Paddle greater than 2.0.0, current version " + std::to_string(version));
|
||||
loadPlaces();
|
||||
if (weights_stream && weights_stream.is_open()) {
|
||||
loadConsts(std::basic_string<T>{}, &weights_stream);
|
||||
if (is_pdmodel(path)) {
|
||||
load_consts(&weights_stream);
|
||||
} else {
|
||||
loadConsts(path, nullptr);
|
||||
load_consts(path);
|
||||
}
|
||||
createTempConsts();
|
||||
}
|
||||
@@ -402,7 +480,7 @@ InputModel::InputModelImpl::InputModelImpl(const std::vector<std::istream*>& str
|
||||
"[Frontend]Only Support Paddle greater than 2.0.0, current version " + std::to_string(version));
|
||||
loadPlaces();
|
||||
if (streams.size() > 1)
|
||||
loadConsts(std::string(), streams[1]);
|
||||
load_consts(streams[1]);
|
||||
createTempConsts();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# PaddlePaddle - generate test models
|
||||
paddlepaddle==2.4.1
|
||||
gast==0.3.3
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
six~=1.15.0
|
||||
protobuf>=3.18.1,<4.0.0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
tensorflow>=1.15.5,<=2.10.0
|
||||
|
||||
@@ -109,49 +109,6 @@ std::string resolve_extension_path(const std::string& path) {
|
||||
return retvalue;
|
||||
}
|
||||
|
||||
ov::util::FilePath getPluginPath(const std::string& pluginName, bool needAddSuffixes = false) {
|
||||
const auto ieLibraryPath = ie::getInferenceEngineLibraryPath();
|
||||
|
||||
auto pluginPath = ov::util::to_file_path(pluginName.c_str());
|
||||
|
||||
// 0. user can provide a full path
|
||||
|
||||
#ifndef _WIN32
|
||||
try {
|
||||
// dlopen works with absolute paths; otherwise searches from LD_LIBRARY_PATH
|
||||
pluginPath = ov::util::to_file_path(ov::util::get_absolute_file_path(pluginName));
|
||||
} catch (const std::runtime_error&) {
|
||||
// failed to resolve absolute path; not critical
|
||||
}
|
||||
#endif // _WIN32
|
||||
|
||||
if (FileUtils::fileExist(pluginPath))
|
||||
return pluginPath;
|
||||
|
||||
// ov::Core::register_plugin(plugin_name, device_name) case
|
||||
if (needAddSuffixes)
|
||||
pluginPath = FileUtils::makePluginLibraryName({}, pluginPath);
|
||||
|
||||
// plugin can be found either:
|
||||
|
||||
// 1. in openvino-X.Y.Z folder relative to libopenvino.so
|
||||
std::ostringstream str;
|
||||
str << "openvino-" << OPENVINO_VERSION_MAJOR << "." << OPENVINO_VERSION_MINOR << "." << OPENVINO_VERSION_PATCH;
|
||||
const auto subFolder = ov::util::to_file_path(str.str());
|
||||
|
||||
ov::util::FilePath absFilePath = FileUtils::makePath(FileUtils::makePath(ieLibraryPath, subFolder), pluginPath);
|
||||
if (FileUtils::fileExist(absFilePath))
|
||||
return absFilePath;
|
||||
|
||||
// 2. in the openvino.so location
|
||||
absFilePath = FileUtils::makePath(ieLibraryPath, pluginPath);
|
||||
if (FileUtils::fileExist(absFilePath))
|
||||
return absFilePath;
|
||||
|
||||
// 3. in LD_LIBRARY_PATH on Linux / PATH on Windows
|
||||
return pluginPath;
|
||||
}
|
||||
|
||||
template <typename T = ie::Parameter>
|
||||
Parsed<T> parseDeviceNameIntoConfig(const std::string& deviceName, const std::map<std::string, T>& config = {}) {
|
||||
auto config_ = config;
|
||||
@@ -571,8 +528,9 @@ public:
|
||||
* @brief Register plugins for devices which are located in .xml configuration file.
|
||||
* @note The function supports UNICODE path
|
||||
* @param xmlConfigFile An .xml configuraion with device / plugin information
|
||||
* @param ByAbsPath A boolean value - register plugins by absolute file path or not
|
||||
*/
|
||||
void RegisterPluginsInRegistry(const std::string& xmlConfigFile) {
|
||||
void RegisterPluginsInRegistry(const std::string& xmlConfigFile, const bool& ByAbsPath = false) {
|
||||
std::lock_guard<std::mutex> lock(get_mutex());
|
||||
|
||||
auto parse_result = ParseXml(xmlConfigFile.c_str());
|
||||
@@ -588,7 +546,8 @@ public:
|
||||
|
||||
FOREACH_CHILD (pluginNode, devicesNode, "plugin") {
|
||||
std::string deviceName = GetStrAttr(pluginNode, "name");
|
||||
ov::util::FilePath pluginPath = getPluginPath(GetStrAttr(pluginNode, "location"));
|
||||
ov::util::FilePath pluginPath =
|
||||
ov::util::get_plugin_path(GetStrAttr(pluginNode, "location"), xmlConfigFile, ByAbsPath);
|
||||
|
||||
if (deviceName.find('.') != std::string::npos) {
|
||||
IE_THROW() << "Device name must not contain dot '.' symbol";
|
||||
@@ -1286,7 +1245,7 @@ public:
|
||||
IE_THROW() << "Device name must not contain dot '.' symbol";
|
||||
}
|
||||
|
||||
PluginDescriptor desc{getPluginPath(pluginName, true)};
|
||||
PluginDescriptor desc{ov::util::get_plugin_path(pluginName)};
|
||||
pluginRegistry[deviceName] = desc;
|
||||
add_mutex(deviceName);
|
||||
}
|
||||
@@ -1665,7 +1624,9 @@ Core::Core(const std::string& xmlConfigFile) {
|
||||
#ifdef OPENVINO_STATIC_LIBRARY
|
||||
_impl->RegisterPluginsInRegistry(::getStaticPluginsRegistry());
|
||||
#else
|
||||
RegisterPlugins(ov::findPluginXML(xmlConfigFile));
|
||||
// If XML is default, load default plugins by absolute paths
|
||||
auto loadByAbsPath = xmlConfigFile.empty();
|
||||
_impl->RegisterPluginsInRegistry(ov::findPluginXML(xmlConfigFile), loadByAbsPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1943,9 +1904,13 @@ Core::Core(const std::string& xmlConfigFile) {
|
||||
_impl = std::make_shared<Impl>();
|
||||
|
||||
#ifdef OPENVINO_STATIC_LIBRARY
|
||||
_impl->RegisterPluginsInRegistry(::getStaticPluginsRegistry());
|
||||
OV_CORE_CALL_STATEMENT(_impl->RegisterPluginsInRegistry(::getStaticPluginsRegistry());)
|
||||
#else
|
||||
register_plugins(findPluginXML(xmlConfigFile));
|
||||
OV_CORE_CALL_STATEMENT({
|
||||
// If XML is default, load default plugins by absolute paths
|
||||
auto loadByAbsPath = xmlConfigFile.empty();
|
||||
_impl->RegisterPluginsInRegistry(findPluginXML(xmlConfigFile), loadByAbsPath);
|
||||
})
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ ov_add_test_target(
|
||||
LINK_LIBRARIES
|
||||
unitTestUtils
|
||||
INCLUDES
|
||||
# for static ie_plugins.hpp
|
||||
"${CMAKE_BINARY_DIR}/src/inference/"
|
||||
LABELS
|
||||
OV
|
||||
)
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
// Copyright (C) 2023 Intel Corporation
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
#include "openvino/runtime/core.hpp"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock-matchers.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "common_test_utils/test_assertions.hpp"
|
||||
#include "file_utils.h"
|
||||
#include "openvino/util/file_util.hpp"
|
||||
|
||||
using namespace testing;
|
||||
using namespace ov::util;
|
||||
|
||||
TEST(CoreTests, ThrowOnRegisterPluginTwice) {
|
||||
ov::Core core;
|
||||
core.register_plugin("test_plugin", "TEST_DEVICE");
|
||||
OV_EXPECT_THROW(core.register_plugin("test_plugin", "TEST_DEVICE"),
|
||||
ov::Exception,
|
||||
::testing::HasSubstr("Device with \"TEST_DEVICE\" is already registered in the OpenVINO Runtime"));
|
||||
}
|
||||
|
||||
TEST(CoreTests, NoThrowOnRegisterPluginsTwice) {
|
||||
ov::Core core;
|
||||
|
||||
auto getPluginXml = [&]() -> std::string {
|
||||
std::string pluginsXML = "test_plugins.xml";
|
||||
std::ofstream file(pluginsXML);
|
||||
file << "<ie><plugins><plugin location=\"libtest_plugin.so\" name=\"TEST_DEVICE\"></plugin></plugins></ie>";
|
||||
file.flush();
|
||||
file.close();
|
||||
return pluginsXML;
|
||||
};
|
||||
|
||||
core.register_plugins(getPluginXml());
|
||||
EXPECT_NO_THROW(core.register_plugins(getPluginXml()));
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath_FromXML, UseAbsPathAsIs) {
|
||||
auto xmlPath = "path_to_plugins.xml";
|
||||
auto libPath = ov::util::get_absolute_file_path("test_name.ext"); // CWD/test_name.ext
|
||||
for (auto asAbsOnly : std::vector<bool>{true, false}) {
|
||||
auto absPath = from_file_path(get_plugin_path(libPath, xmlPath, asAbsOnly));
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
EXPECT_STREQ(absPath.c_str(), libPath.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath_FromXML, ConvertRelativePathAsRelativeToXMLDir) {
|
||||
auto xmlPath = "path_to_plugins.xml";
|
||||
auto libPath = FileUtils::makePath(std::string("."), std::string("test_name.ext")); // ./test_name.ext
|
||||
for (auto asAbsOnly : std::vector<bool>{true, false}) {
|
||||
auto absPath = from_file_path(get_plugin_path(libPath, xmlPath, asAbsOnly)); // XMLDIR/test_name.ext
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
|
||||
auto refPath = ov::util::get_absolute_file_path(libPath);
|
||||
EXPECT_STREQ(absPath.c_str(), refPath.c_str()); // XMLDIR/test_name.ext == CWD/test_name.ext
|
||||
}
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath_FromXML, ConvertFileNameToAbsPathIfAsAbsOnly) {
|
||||
auto xmlPath = "path_to_plugins.xml";
|
||||
auto name = "test_name.ext"; // test_name.ext
|
||||
auto absPath = from_file_path(get_plugin_path(name, xmlPath, true)); // XMLDIR/libtest_name.ext.so
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
|
||||
auto libName = FileUtils::makePluginLibraryName({}, std::string(name));
|
||||
auto refPath = ov::util::get_absolute_file_path(libName);
|
||||
EXPECT_STREQ(absPath.c_str(), refPath.c_str()); // XMLDIR/libtest_name.ext.so == CWD/libtest_name.ext.so
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath_FromXML, UseFileNameIfNotAsAbsOnly) {
|
||||
auto xmlPath = "path_to_plugins.xml";
|
||||
auto name = "test_name.ext"; // test_name.ext
|
||||
auto libName = from_file_path(get_plugin_path(name, xmlPath)); // libtest_name.ext.so
|
||||
auto refName = FileUtils::makePluginLibraryName({}, std::string(name));
|
||||
EXPECT_STREQ(libName.c_str(), refName.c_str());
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath, UseAbsPathAsIs) {
|
||||
auto libName = FileUtils::makePluginLibraryName({}, std::string("test_name")); // libtest_name.so
|
||||
auto libPath = ov::util::get_absolute_file_path(libName);
|
||||
auto absPath = from_file_path(get_plugin_path(libPath));
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
EXPECT_STREQ(absPath.c_str(), libPath.c_str());
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath, RelativePathIsFromWorkDir) {
|
||||
auto libName = FileUtils::makePluginLibraryName(std::string("."), std::string("test_name")); // ./libtest_name.so
|
||||
auto absPath = from_file_path(get_plugin_path(libName));
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
EXPECT_STREQ(absPath.c_str(), get_absolute_file_path(libName).c_str());
|
||||
}
|
||||
|
||||
class CoreTests_getPluginPath_Class : public ::testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
std::ofstream file(libPath);
|
||||
file << "not empty";
|
||||
file.flush();
|
||||
file.close();
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
std::remove(libPath.c_str());
|
||||
}
|
||||
|
||||
std::string libName = FileUtils::makePluginLibraryName({}, std::string("test_name")); // libtest_name.so
|
||||
std::string libPath = ov::util::get_absolute_file_path(libName); // CWD/libtest_name.so
|
||||
};
|
||||
|
||||
TEST_F(CoreTests_getPluginPath_Class, FileNameIsFromWorkDirIfExists) {
|
||||
auto absPath = from_file_path(get_plugin_path(libName)); // libtest_name.so -> CWD/libtest_name.so
|
||||
EXPECT_TRUE(is_absolute_file_path(absPath));
|
||||
EXPECT_STREQ(absPath.c_str(), get_absolute_file_path(libName).c_str());
|
||||
}
|
||||
|
||||
TEST(CoreTests_getPluginPath, UseFileNameAsIsIfNotExistInWorkDir) {
|
||||
auto libName = "test_name.ext";
|
||||
auto absPath = from_file_path(get_plugin_path(libName)); // libtest_name.ext.so -> libtest_name.ext.so
|
||||
EXPECT_FALSE(is_absolute_file_path(absPath));
|
||||
|
||||
auto refPath = FileUtils::makePluginLibraryName({}, std::string(libName));
|
||||
EXPECT_STREQ(absPath.c_str(), refPath.c_str());
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
argparse
|
||||
matplotlib~=3.3.4; python_version<'3.7'
|
||||
matplotlib>=3.3.4, <3.6; python_version>='3.7'
|
||||
@@ -1,2 +1,2 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
opencv-python>=4.5
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
opencv-python==4.5.*
|
||||
@@ -6,9 +6,6 @@ import logging as log
|
||||
|
||||
from openvino.tools.mo.utils.error import Error
|
||||
from openvino.tools.mo.utils.utils import refer_to_faq_msg
|
||||
|
||||
import numpy as np
|
||||
|
||||
from openvino.preprocess import PrePostProcessor # pylint: disable=no-name-in-module,import-error
|
||||
# pylint: disable=no-name-in-module,import-error
|
||||
from openvino.runtime import Model, Layout, PartialShape, layout_helpers
|
||||
@@ -25,7 +22,7 @@ def update_mean_scale_to_dict(input_nodes: list, mean_scale_val, scale):
|
||||
if len(mean_scale_val) != len(input_nodes):
|
||||
raise Error('Numbers of inputs and mean/scale values do not match. ' + refer_to_faq_msg(61))
|
||||
|
||||
data = np.copy(mean_scale_val)
|
||||
data = mean_scale_val
|
||||
mean_scale_val = {}
|
||||
for idx, node in enumerate(input_nodes):
|
||||
names_list = list(node.get_tensor().get_names())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
tensorflow>=1.15.5,<=2.10.0
|
||||
mxnet~=1.2.0; sys_platform == 'win32'
|
||||
mxnet>=1.7.0.post2,<=1.9.1; sys_platform != 'win32'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
protobuf>=3.18.1,<4.0.0
|
||||
defusedxml>=0.7.1
|
||||
requests>=2.25.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
defusedxml>=0.7.1
|
||||
requests>=2.25.1
|
||||
fastjsonschema~=2.15.1
|
||||
|
||||
@@ -2,7 +2,7 @@ mxnet~=1.2.0; sys_platform == 'win32'
|
||||
mxnet>=1.7.0.post2,<=1.9.1; sys_platform != 'win32'
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.24.0
|
||||
defusedxml>=0.7.1
|
||||
urllib3>=1.26.4
|
||||
requests>=2.25.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
onnx>=1.8.1,<=1.12
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
defusedxml>=0.7.1
|
||||
requests>=2.25.1
|
||||
fastjsonschema~=2.15.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
tensorflow>=1.15.5,<=2.10.0
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy>=1.16.6,<1.25.0
|
||||
numpy>=1.16.6,<1.26.0
|
||||
tensorflow>=2.5,<=2.10.0
|
||||
networkx~=2.5; python_version <= "3.6"
|
||||
networkx<=2.8.8; python_version > "3.6"
|
||||
|
||||
@@ -114,7 +114,7 @@ The example code below shows a basic quantization workflow with accuracy control
|
||||
|
||||
```python
|
||||
from openvino.tools.pot import IEEngine
|
||||
from openvino.tools.pot load_model, save_model
|
||||
from openvino.tools.pot import load_model, save_model
|
||||
from openvino.tools.pot import compress_model_weights
|
||||
from openvino.tools.pot import create_pipeline
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ An example code below shows a basic quantization workflow:
|
||||
|
||||
```python
|
||||
from openvino.tools.pot import IEEngine
|
||||
from openvino.tools.pot load_model, save_model
|
||||
from openvino.tools.pot import load_model, save_model
|
||||
from openvino.tools.pot import compress_model_weights
|
||||
from openvino.tools.pot import create_pipeline
|
||||
|
||||
|
||||
@@ -3,101 +3,108 @@
|
||||
If your question is not covered below, use the [OpenVINO™ Community Forum page](https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/bd-p/distribution-openvino-toolkit),
|
||||
where you can participate freely.
|
||||
|
||||
- <a href="#opensourced">Is the Post-training Optimization Tool opensourced?</a>
|
||||
- <a href="#dataset">Can I quantize my model without a dataset?</a>
|
||||
- <a href="#framework">Can a model in any framework be quantized by the POT?</a>
|
||||
- <a href="#tradeoff">What is a tradeoff when you go to low precision?</a>
|
||||
- <a href="#noac">I'd like to quantize a model and I've converted it to IR but I don't have the Accuracy Checker config. What can I do?</a>
|
||||
- <a href="#nncf">I tried all recommendations from "Post-Training Optimization Best Practices" but either have a high accuracy drop or bad performance after quantization.
|
||||
What else can I do?</a>
|
||||
- <a href="#memory">I get “RuntimeError: Cannot get memory” and “RuntimeError: Output data was not allocated” when I quantize my model by the POT.</a>
|
||||
- <a href="#quality">I have successfully quantized my model with a low accuracy drop and improved performance but the output video generated from the low precision model is much worse than from the full precision model. What could be the root cause?</a>
|
||||
- <a href="#longtime">The quantization process of my model takes a lot of time. Can it be decreased somehow?</a>
|
||||
- <a href="#import">I get "Import Error:... No such file or directory". How can I avoid it?</a>
|
||||
- <a href="#python">When I execute POT CLI, I get "File "/workspace/venv/lib/python3.7/site-packages/nevergrad/optimization/base.py", line 35... SyntaxError: invalid syntax". What is wrong?</a>
|
||||
- <a href="#nomodule">What does a message "ModuleNotFoundError: No module named 'some\_module\_name'" mean?</a>
|
||||
- <a href="#dump">Is there a way to collect an intermidiate IR when the AccuracyAware mechanism fails?</a>
|
||||
- <a href="#outputs">What do the messages "Output name: result_operation_name not found" or "Output node with result_operation_name is not found in graph" mean?</a>
|
||||
|
||||
.. dropdown:: Is the Post-training Optimization Tool (POT) open-sourced?
|
||||
|
||||
Yes, POT is developed on GitHub as a part of `openvinotoolkit/openvino <https://github.com/openvinotoolkit/openvino>`__ under Apache-2.0 License.
|
||||
|
||||
.. dropdown:: Can I quantize my model without a dataset?
|
||||
|
||||
In general, you should have a dataset. The dataset should be annotated if you want to validate the accuracy.
|
||||
If your dataset is not annotated, you can use :doc:`Default Quantization <pot_default_quantization_usage>`
|
||||
to quantize the model or command-line interface with :doc:`Simplified mode <pot_docs_simplified_mode>`.
|
||||
|
||||
.. dropdown:: Can a model in any framework be quantized by the POT?
|
||||
|
||||
The POT accepts models in the OpenVINO™ Intermediate Representation (IR) format only. For that you need to convert your model to the IR format using
|
||||
:doc:`model conversion API <openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide>`.
|
||||
|
||||
|
||||
### <a name="opensourced">Is the Post-training Optimization Tool (POT) opensourced?</a>
|
||||
.. dropdown:: I'd like to quantize a model and I've converted it to IR but I don't have the Accuracy Checker config. What can I do?
|
||||
|
||||
Yes, POT is developed on GitHub as a part of [openvinotoolkit/openvino](https://github.com/openvinotoolkit/openvino) under Apache-2.0 License.
|
||||
1. Try quantization using Python API of the Post-training Optimization Tool. For more details see :doc:`Default Quantization <pot_default_quantization_usage>`.
|
||||
2. If you consider command-line usage only refer to :doc:`Accuracy Checker documentation <omz_tools_accuracy_checker>` to create the Accuracy Checker configuration file,
|
||||
and try to find the configuration file for your model among the ones available in the Accuracy Checker examples.
|
||||
3. An alternative way is to quantize the model in the :doc:`Simplified mode <pot_docs_simplified_mode>` but you will not be able to measure the accuracy.
|
||||
|
||||
### <a name="dataset">Can I quantize my model without a dataset?</a>
|
||||
.. dropdown:: What is a tradeoff when you go to low precision?
|
||||
|
||||
In general, you should have a dataset. The dataset should be annotated if you want to validate the accuracy.
|
||||
If your dataset is not annotated, you can use [Default Quantization](@ref pot_default_quantization_usage) to quantize the model or command-line interface with [Simplified mode](@ref pot_docs_simplified_mode).
|
||||
The tradeoff is between the accuracy drop and performance. When a model is in low precision, it is usually performed
|
||||
compared to the same model in full precision but the accuracy might be worse. You can find some benchmarking results in
|
||||
:doc:`INT8 vs FP32 Comparison on Select Networks and Platforms <openvino_docs_performance_int8_vs_fp32>`.
|
||||
The other benefit of having a model in low precision is its smaller size.
|
||||
|
||||
### <a name="framework">Can a model in any framework be quantized by the POT?</a>
|
||||
.. dropdown:: I tried all recommendations from "Post-Training Optimization Best Practices" but either have a high accuracy drop or bad performance after quantization. What else can I do?
|
||||
|
||||
The POT accepts models in the OpenVINO™ Intermediate Representation (IR) format only. For that you need to convert your model to the IR format using
|
||||
[Model Optimizer](@ref openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide).
|
||||
First of all, you should validate the POT compression pipeline you are running, which can be done with the following steps:
|
||||
|
||||
### <a name="noac">I'd like to quantize a model and I've converted it to IR but I don't have the Accuracy Checker config. What can I do?</a>
|
||||
1. Make sure the accuracy of the original uncompressed model has the value you expect. Run your POT pipeline with an empty compression config and evaluate the resulting model metric.
|
||||
Compare this uncompressed model accuracy metric value with your reference.
|
||||
2. Run your compression pipeline with a single compression algorithm (:doc:`Default Quantization <pot_default_quantization_usage>` or :doc:`Accuracy-aware Quantization <pot_accuracyaware_usage>`)
|
||||
without any parameter values specified in the config (except for ``preset`` and ``stat_subset_size``). Make sure you get the desirable accuracy drop/performance gain in this case.
|
||||
|
||||
1. Try quantization using Python API of the Post-training Optimization Tool. For more details see [Default Quantization](@ref pot_default_quantization_usage).
|
||||
2. If you consider command-line usage only refer to [Accuracy Checker documentation](@ref omz_tools_accuracy_checker) to create the Accuracy Checker configuration file, and try to find the configuration file for your model among the ones available in the Accuracy Checker examples.
|
||||
3. An alternative way is to quantize the model in the [Simplified mode](@ref pot_docs_simplified_mode) but you will not be able to measure the accuracy.
|
||||
Finally, if you have done the steps above and the problem persists, you could try to compress your model using the
|
||||
`Neural Network Compression Framework (NNCF) <https://github.com/openvinotoolkit/nncf_pytorch>`__. Note that NNCF usage requires you to have a
|
||||
PyTorch or TensorFlow 2 based training pipeline of your model to perform Quantization-aware Training.
|
||||
See :doc:`Model Optimization Guide <openvino_docs_model_optimization_guide>` for more details.
|
||||
|
||||
### <a name="tradeoff">What is a tradeoff when you go to low precision?</a>
|
||||
.. dropdown:: I get “RuntimeError: Cannot get memory” and “RuntimeError: Output data was not allocated” when I quantize my model by the POT.
|
||||
|
||||
The tradeoff is between the accuracy drop and performance. When a model is in low precision, it is usually performed
|
||||
compared to the same model in full precision but the accuracy might be worse. You can find some benchmarking results in
|
||||
[INT8 vs FP32 Comparison on Select Networks and Platforms](@ref openvino_docs_performance_int8_vs_fp32).
|
||||
The other benefit of having a model in low precision is its smaller size.
|
||||
These issues happen due to insufficient available amount of memory for statistics collection during the quantization process of a huge model or
|
||||
due to a very high resolution of input images in the quantization dataset. If you do not have a possibility to increase your RAM size, one of the following options can help:
|
||||
|
||||
### <a name="nncf">I tried all recommendations from "Post-Training Optimization Best Practices" but either have a high accuracy drop or bad performance after quantization. What else can I do?</a>
|
||||
- Set ``inplace_statistics`` parameters to ``True``. In that case, the POT will change the method to collect statistics and use less memory.
|
||||
Note that such change might increase the time required for quantization.
|
||||
- Set ``eval_requests_number`` and ``stat_requests_number`` parameters to 1. In that case, the POT will limit the number of infer requests by 1 and use less memory.
|
||||
Note that such change might increase the time required for quantization.
|
||||
- Set ``use_fast_bias`` parameter to ``false``. In that case, the POT will switch from the FastBiasCorrection algorithm to the full BiasCorrection algorithm
|
||||
which is usually more accurate and takes more time but requires less memory. See :doc:`Post-Training Optimization Best Practices <pot_docs_BestPractices>` for more details.
|
||||
- Reshape your model to a lower resolution and resize the size of images in the dataset. Note that such change might impact the accuracy.
|
||||
|
||||
First of all, you should validate the POT compression pipeline you are running, which can be done with the following steps:
|
||||
1. Make sure the accuracy of the original uncompressed model has the value you expect. Run your POT pipeline with an empty compression config and evaluate the resulting model metric. Compare this uncompressed model accuracy metric value with your reference.
|
||||
2. Run your compression pipeline with a single compression algorithm ([Default Quantization](@ref pot_default_quantization_usage) or [Accuracy-aware Quantization](@ref pot_accuracyaware_usage)) without any parameter values specified in the config (except for `preset` and `stat_subset_size`). Make sure you get the desirable accuracy drop/performance gain in this case.
|
||||
.. dropdown:: I have successfully quantized my model with a low accuracy drop and improved performance but the output video generated from the low precision model is much worse than from the full precision model. What could be the root cause?
|
||||
|
||||
Finally, if you have done the steps above and the problem persists, you could try to compress your model using the [Neural Network Compression Framework (NNCF)](https://github.com/openvinotoolkit/nncf_pytorch).
|
||||
Note that NNCF usage requires you to have a PyTorch or TensorFlow 2 based training pipeline of your model to perform Quantization-aware Training. See [Model Optimization Guide](@ref openvino_docs_model_optimization_guide) for more details.
|
||||
It can happen due to the following reasons:
|
||||
|
||||
- A wrong or not representative dataset was used during the quantization and accuracy validation.
|
||||
Please make sure that your data and labels are correct and they sufficiently reflect the use case.
|
||||
- If the command-line interface was used for quantization, a wrong Accuracy Checker configuration file could lead to this problem.
|
||||
Refer to :doc:`Accuracy Checker documentation <omz_tools_accuracy_checker>` for more information.
|
||||
- If :doc:`Default Quantization <pot_default_quantization_usage>` was used for quantization you can also try
|
||||
:doc:`Accuracy-aware Quantization <pot_accuracyaware_usage>` method that allows controlling maximum accuracy deviation.
|
||||
|
||||
### <a name="memory">I get “RuntimeError: Cannot get memory” and “RuntimeError: Output data was not allocated” when I quantize my model by the POT.</a>
|
||||
.. dropdown:: The quantization process of my model takes a lot of time. Can it be decreased somehow?
|
||||
|
||||
These issues happen due to insufficient available amount of memory for statistics collection during the quantization process of a huge model or
|
||||
due to a very high resolution of input images in the quantization dataset. If you do not have a possibility to increase your RAM size, one of the following options can help:
|
||||
- Set `inplace_statistics` parameters to "True". In that case the POT will change method collect statistics and use less memory. Note that such change might increase time required for quantization.
|
||||
- Set `eval_requests_number` and `stat_requests_number` parameters to 1. In that case the POT will limit the number of infer requests by 1 and use less memory.
|
||||
Note that such change might increase time required for quantization.
|
||||
- Set `use_fast_bias` parameter to `false`. In that case the POT will switch from the FastBiasCorrection algorithm to the full BiasCorrection algorithm
|
||||
which is usually more accurate and takes more time but requires less memory. See [Post-Training Optimization Best Practices](BestPractices.md) for more details.
|
||||
- Reshape your model to a lower resolution and resize the size of images in the dataset. Note that such change might impact the accuracy.
|
||||
Quantization time depends on multiple factors such as the size of the model and the dataset. It also depends on the algorithm:
|
||||
the :doc:`Default Quantization <pot_default_quantization_usage>` algorithm takes less time than the :doc:`Accuracy-aware Quantization <pot_accuracyaware_usage>` algorithm.
|
||||
The following configuration parameters also impact the quantization time duration
|
||||
(see details in :doc:`Post-Training Optimization Best Practices <pot_docs_BestPractices>`):
|
||||
|
||||
- ``use_fast_bias``: when set to ``false``, it increases the quantization time
|
||||
- ``stat_subset_size``: the higher the value of this parameter, the more time will be required for the quantization
|
||||
- ``tune_hyperparams``: if set to ``true`` when the AccuracyAwareQuantization algorithm is used, it increases the quantization time
|
||||
- ``stat_requests_number``: the lower number, the more time might be required for the quantization
|
||||
- ``eval_requests_number``: the lower number, the more time might be required for the quantization
|
||||
|
||||
### <a name="quality">I have successfully quantized my model with a low accuracy drop and improved performance but the output video generated from the low precision model is much worse than from the full precision model. What could be the root cause?</a>
|
||||
Note that higher values of ``stat_requests_number`` and ``eval_requests_number`` increase memory consumption by POT.
|
||||
|
||||
It can happen due to the following reasons:
|
||||
- A wrong or not representative dataset was used during the quantization and accuracy validation. Please make sure that your data and labels are correct and they sufficiently reflect the use case.
|
||||
- If the command-line interface was used for quantization, a wrong Accuracy Checker configuration file could lead to this problem. Refer to [Accuracy Checker documentation](@ref omz_tools_accuracy_checker) for more information.
|
||||
- If [Default Quantization](@ref pot_default_quantization_usage) was used for quantization you can also try [Accuracy-aware Quantization](@ref pot_accuracyaware_usage) method that allows controlling maximum accuracy deviation.
|
||||
.. dropdown:: When I execute POT CLI, I get "File "/workspace/venv/lib/python3.7/site-packages/nevergrad/optimization/base.py", line 35... SyntaxError: invalid syntax". What is wrong?
|
||||
|
||||
### <a name="longtime">The quantization process of my model takes a lot of time. Can it be decreased somehow?</a>
|
||||
This error is reported when you have a Python version older than 3.7 in your environment. Upgrade your Python version.
|
||||
|
||||
Quantization time depends on multiple factors such as the size of the model and the dataset. It also depends on the algorithm:
|
||||
the [Default Quantization](@ref pot_default_quantization_usage) algorithm takes less time than the [Accuracy-aware Quantization](@ref pot_accuracyaware_usage) algorithm.
|
||||
The following configuration parameters also impact the quantization time duration
|
||||
(see details in [Post-Training Optimization Best Practices](BestPractices.md)):
|
||||
- `use_fast_bias`: when set to `false`, it increases the quantization time
|
||||
- `stat_subset_size`: the higher the value of this parameter, the more time will be required for the quantization
|
||||
- `tune_hyperparams`: if set to `true` when the AccuracyAwareQuantization algorithm is used, it increases the quantization time
|
||||
- `stat_requests_number`: the lower number, the more time might be required for the quantization
|
||||
- `eval_requests_number`: the lower number, the more time might be required for the quantization
|
||||
Note that higher values of `stat_requests_number` and `eval_requests_number` increase memory consumption by POT.
|
||||
.. dropdown:: What does the message "ModuleNotFoundError: No module named 'some\_module\_name'" mean?
|
||||
|
||||
### <a name="python">When I execute POT CLI, I get "File "/workspace/venv/lib/python3.7/site-packages/nevergrad/optimization/base.py", line 35... SyntaxError: invalid syntax". What is wrong?</a>
|
||||
It means that some required python module is not installed in your environment. To install it, run ``pip install some_module_name``.
|
||||
|
||||
This error is reported when you have a Python version older than 3.7 in your environment. Upgrade your Python version.
|
||||
.. dropdown:: Is there a way to collect an intermediate IR when the AccuracyAware mechanism fails?
|
||||
|
||||
### <a name="nomodule">What does a message "ModuleNotFoundError: No module named 'some\_module\_name'" mean?</a>
|
||||
You can add ``"dump_intermediate_model": true`` to the POT configuration file and it will drop an intermediate IR to ``accuracy_aware_intermediate`` folder.
|
||||
|
||||
It means that some required python module is not installed in your environment. To install it, run `pip install some_module_name`.
|
||||
.. dropdown:: What do the messages "Output name: result_operation_name not found" or "Output node with result_operation_name is not found in graph" mean?
|
||||
|
||||
### <a name="dump">Is there a way to collect an intermidiate IR when the AccuracyAware mechanism fails?</a>
|
||||
Errors are caused by missing output nodes names in a graph when using the POT tool for model quantization.
|
||||
It might appear for some models only for IRs converted from ONNX models using the new frontend (which is the default
|
||||
conversion path starting from 2022.1 release). To avoid such errors, use the legacy MO frontend to convert a model
|
||||
to IR by passing the ``--use_legacy_frontend`` option. Then, use the produced IR for quantization.
|
||||
|
||||
You can add `"dump_intermediate_model": true` to the POT configuration file and it will drop an intermidiate IR to `accuracy_aware_intermediate` folder.
|
||||
@endsphinxdirective
|
||||
|
||||
### <a name="outputs">What do the messages "Output name: result_operation_name not found" or "Output node with result_operation_name is not found in graph" mean?</a>
|
||||
Errors are caused by missing output nodes names in a graph when using the POT tool for model quantization. It might appear for some models only for IRs converted from ONNX models using new frontend (which is the default conversion path starting from 2022.1 release). To avoid such errors, use legacy MO frontend to convert a model to IR by passing the --use_legacy_frontend option. Then, use the produced IR for quantization.
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ INSTALL_REQUIRES = [
|
||||
"scipy~=1.7; python_version == '3.7'",
|
||||
"scipy>=1.8; python_version >= '3.8'",
|
||||
"jstyleson>=0.0.2",
|
||||
"numpy>=1.16.6,<1.25.0",
|
||||
"numpy>=1.16.6,<1.26.0",
|
||||
"addict>=2.4.0",
|
||||
"networkx<=2.8.8",
|
||||
"tqdm>=4.54.1",
|
||||
|
||||
Reference in New Issue
Block a user