Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM CPU] Avg Pooling, ROI Pooling fix for fp16 precision #20658

Merged
merged 56 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d90d806
MVN fix
allnes Oct 16, 2023
1b832fa
behavior fix
allnes Oct 16, 2023
accae87
non zero fix
allnes Oct 16, 2023
3914b37
normalize fix
allnes Oct 16, 2023
e81b375
ctc_greedy_decoder.cpp fix
allnes Oct 16, 2023
611b76c
ctc_greedy_decoder_seq_len.cpp fix
allnes Oct 16, 2023
69f30b5
non zero style fix
allnes Oct 16, 2023
2d66d2c
rnn fix
allnes Oct 16, 2023
c449bb8
enable tests
allnes Oct 16, 2023
d127228
Merge branch 'master' into an/general_fix_fp16
allnes Oct 16, 2023
f681ee4
Restore f16 precision due to GPU performance drop (#20443)
praasz Oct 16, 2023
9fc88ec
[AUTO] Update python example and selection logic notice (#20294)
yangwang201911 Oct 17, 2023
9154ce8
[GPU] Reserve CPU resource for GPU inference (#19214)
yangwang201911 Oct 17, 2023
1f21acb
[GPU] Fixed data generation for f16 fusion tests (#20247)
Lyamin-Roman Oct 17, 2023
9354ef7
[TF FE][TF Hub] Support Xlog1py operation (#20500)
siddhant-0707 Oct 17, 2023
e6178f6
Remove TREAT_WARNING option from the doc (#20507)
ilyachur Oct 17, 2023
090189d
[DOCS] Supported formats update for Benchmark C++ Tool for master (#2…
msmykx-intel Oct 17, 2023
d5974e6
corrected comments
allnes Oct 17, 2023
d7da60e
Merge branch 'master' into an/general_fix_fp16
allnes Oct 17, 2023
046aacb
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 17, 2023
987b5a6
Update normalize.cpp
allnes Oct 17, 2023
1c86852
Update normalize.cpp
allnes Oct 17, 2023
b476122
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 17, 2023
8099d82
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 17, 2023
31eb82d
fix behavior tests
allnes Oct 17, 2023
1cc4daa
skip tests
allnes Oct 17, 2023
234b6b5
skip tests 2
allnes Oct 17, 2023
98c17bf
Merge remote-tracking branch 'origin/an/general_fix_fp16' into an/gen…
allnes Oct 17, 2023
a8eaa1d
skip tests - additional
allnes Oct 17, 2023
b9da207
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 17, 2023
d039f4f
avgpool fix
allnes Oct 17, 2023
025c769
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 18, 2023
33b06ba
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 18, 2023
85e0a63
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 19, 2023
32d38b3
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 23, 2023
f98bb69
roi_pooling.cpp fix
allnes Oct 23, 2023
346a605
Update roi_pooling.cpp
allnes Oct 24, 2023
e79389d
Merge branch 'master' into an/general_fix_fp16
allnes Oct 24, 2023
8cbb075
Update skip_tests_config.cpp
allnes Oct 24, 2023
f852022
fix comments 2
allnes Oct 24, 2023
cbd019f
fix comments 3
allnes Oct 24, 2023
092be63
Merge branch 'master' into an/general_fix_fp16
allnes Oct 24, 2023
5fab47b
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 25, 2023
1b7ebe7
fix win build
allnes Oct 25, 2023
d65d97b
Merge remote-tracking branch 'origin/an/general_fix_fp16' into an/gen…
allnes Oct 25, 2023
399a000
fix win build 2
allnes Oct 25, 2023
81500bb
Merge branch 'master' of https://github.com/openvinotoolkit/openvino …
allnes Oct 25, 2023
2acb311
Update roi_pooling.cpp
allnes Oct 25, 2023
0e175c5
Merge branch 'master' into an/general_fix_fp16
allnes Oct 25, 2023
2d952dc
Merge branch 'an/general_fix_fp16' of https://github.com/allnes/openv…
allnes Oct 25, 2023
7315f7b
fix win build 3
allnes Oct 25, 2023
f7c1a62
fix win build 4
allnes Oct 26, 2023
720ed43
Merge branch 'master' into an/general_fix_fp16
allnes Oct 26, 2023
b0aa8d0
refactor view
allnes Oct 26, 2023
3b4e0bc
Merge remote-tracking branch 'origin/an/general_fix_fp16' into an/gen…
allnes Oct 26, 2023
e4e0677
Merge branch 'master' into an/general_fix_fp16
allnes Oct 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[AUTO] Update python example and selection logic notice (#20294)
* Enable device properties setting via AUTO plugin.

* Update.

* Update.

* Update.

* Update.

* Update.

* Update.

* Update docs/OV_Runtime_UG/auto_device_selection.md

Co-authored-by: yanlan song <bell.song@intel.com>

* Add for stateful model

* Fix the link

---------

Co-authored-by: yanlan song <bell.song@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
  • Loading branch information
3 people authored and allnes committed Oct 17, 2023
commit 9fc88ecb131c30481f5b123b46d2fb4047740cfd
30 changes: 24 additions & 6 deletions docs/OV_Runtime_UG/auto_device_selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ The logic behind the choice is as follows:
To put it simply, when loading the model to the first device on the list fails, AUTO will try to load it to the next device in line, until one of them succeeds.
What is important, **AUTO starts inference with the CPU of the system by default**, as it provides very low latency and can start inference with no additional delays.
While the CPU is performing inference, AUTO continues to load the model to the device best suited for the purpose and transfers the task to it when ready.
This way, the devices which are much slower in compiling models, GPU being the best example, do not impede inference at its initial stages.
This way, the devices which are much slower in compiling models, GPU being the best example, do not impact inference at its initial stages.
For example, if you use a CPU and a GPU, the first-inference latency of AUTO will be better than that of using GPU alone.

Note that if you choose to exclude CPU from the priority list or disable the initial CPU acceleration feature via ``ov::intel_auto::enable_startup_fallback``, it will be unable to support the initial model compilation stage.

Note that if you choose to exclude CPU from the priority list or disable the initial CPU acceleration feature via ``ov::intel_auto::enable_startup_fallback``, it will be unable to support the initial model compilation stage. The models with dynamic input/output or stateful :doc:`stateful<openvino_docs_OV_UG_model_state_intro>` operations will be loaded to the CPU if it is in the candidate list. Otherwise, these models will follow the normal flow and be loaded to the device based on priority.

.. image:: _static/images/autoplugin_accelerate.svg

Expand Down Expand Up @@ -91,7 +90,7 @@ Following the OpenVINO™ naming convention, the Automatic Device Selection mode


+----------------------------------------------+--------------------------------------------------------------------+
| Property | Values and Description |
| Property(C++ version) | Values and Description |
+==============================================+====================================================================+
| <device candidate list> | **Values**: |
| | |
Expand Down Expand Up @@ -170,6 +169,25 @@ Following the OpenVINO™ naming convention, the Automatic Device Selection mode
Inference with AUTO is configured similarly to when device plugins are used:
you compile the model on the plugin with configuration and execute inference.

The code samples on this page assume following import(Python)/using (C++) are included at the beginning of code snippets.

.. tab-set::

.. tab-item:: Python
:sync: py

.. doxygensnippet:: docs/snippets/ov_auto.py
:language: python
:fragment: [py_ov_property_import_header]

.. tab-item:: C++
:sync: cpp

.. doxygensnippet:: docs/snippets/AUTO0.cpp
:language: cpp
:fragment: [py_ov_property_import_header]



Device Candidates and Priority
++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -303,7 +321,7 @@ If device priority is specified when using CUMULATIVE_THROUGHPUT, AUTO will run

.. code-block:: sh

compiled_model = core.compile_model(model, "AUTO:GPU,CPU", {"PERFORMANCE_HINT" : {"CUMULATIVE_THROUGHPUT"}})
compiled_model = core.compile_model(model, "AUTO:GPU,CPU", {hints.performance_mode: hints.PerformanceMode.CUMULATIVE_THROUGHPUT})

.. tab-item:: C++
:sync: cpp
Expand All @@ -322,7 +340,7 @@ If AUTO is used without specifying any device names, and if there are multiple G

.. code-block:: sh

compiled_model = core.compile_model(model, "AUTO:GPU.1,GPU.0", {"PERFORMANCE_HINT" : {"CUMULATIVE_THROUGHPUT"})
compiled_model = core.compile_model(model, "AUTO:GPU.1,GPU.0", {hints.performance_mode: hints.PerformanceMode.CUMULATIVE_THROUGHPUT})

.. tab-item:: C++
:sync: cpp
Expand Down
2 changes: 2 additions & 0 deletions docs/snippets/AUTO0.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//! [py_ov_property_import_header]
#include <openvino/openvino.hpp>
//! [py_ov_property_import_header]

int main() {
{
Expand Down
23 changes: 21 additions & 2 deletions docs/snippets/ov_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
# SPDX-License-Identifier: Apache-2.0
#

#! [py_ov_property_import_header]
import openvino as ov
import openvino.properties as properties
import openvino.properties.device as device
import openvino.properties.hint as hints
import openvino.properties.streams as streams
import properties.enable_profiling as enable_profiling
#! [py_ov_property_import_header]
import openvino.properties.log as log

from openvino.inference_engine import IECore
Expand Down Expand Up @@ -156,8 +160,23 @@ def part5():
core = ov.Core()

# gpu_config and cpu_config will load during compile_model()
compiled_model = core.compile_model(model=model)
compiled_model = core.compile_model(model=model, device_name="AUTO")
gpu_config = {
hints.performance_mode: hints.PerformanceMode.THROUGHPUT,
streams.num: 4
}
cpu_config = {
hints.performance_mode: hints.PerformanceMode.LATENCY,
streams.num: 8,
enable_profiling: True
}
compiled_model = core.compile_model(
model=model,
device_name="AUTO",
config={
device.priorities: "GPU,CPU",
device.properties: {'CPU': cpu_config, 'GPU': gpu_config}
}
)
#! [part5]


Expand Down
9 changes: 6 additions & 3 deletions docs/snippets/ov_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import openvino as ov
import openvino.properties as properties
import openvino.properties.device as device
import openvino.properties.streams as streams
from utils import get_model

model = get_model()
Expand Down Expand Up @@ -96,15 +97,17 @@ def available_devices_2():
def MULTI_4():
#! [MULTI_4]
core = ov.Core()
cpu_config = {}
gpu_config = {}
cpu_config = {streams.num : 4}
gpu_config = {streams.num : 8}

# When compiling the model on MULTI, configure CPU and GPU
# (devices, priorities, and device configurations; gpu_config and cpu_config will load during compile_model() ):
compiled_model = core.compile_model(
model=model,
device_name="MULTI:GPU,CPU",
config={"CPU": "NUM_STREAMS 4", "GPU": "NUM_STREAMS 8"},
config={
device.properties: {'CPU': cpu_config, 'GPU': gpu_config}
}
)

# Optionally, query the optimal number of requests:
Expand Down