Port api reference (#11152)

This commit is contained in:
Ilya Churaev
2022-03-23 10:03:16 +03:00
committed by GitHub
parent 6710d78e63
commit 1ad4a99478
32 changed files with 296 additions and 61 deletions

View File

@@ -9,11 +9,12 @@
Implement Plugin Functionality <openvino_docs_ie_plugin_dg_plugin>
Implement Executable Network Functionality <openvino_docs_ie_plugin_dg_executable_network>
openvino_docs_ie_plugin_dg_quantized_networks
Implement Synchronous Inference Request <openvino_docs_ie_plugin_dg_infer_request>
Implement Asynchronous Inference Request <openvino_docs_ie_plugin_dg_async_infer_request>
openvino_docs_ie_plugin_dg_plugin_build
openvino_docs_ie_plugin_dg_plugin_testing
openvino_docs_ie_plugin_detailed_guides
openvino_docs_ie_plugin_api_references
@endsphinxdirective
@@ -61,5 +62,5 @@ Detailed guides
API References
-----------------------
* [Inference Engine Plugin API](groupie_dev_api.html)
* [Inference Engine Transformation API](groupie_transformation_api.html)
* [Inference Engine Plugin API](@ref ie_dev_api)
* [Inference Engine Transformation API](@ref ie_transformation_api)

View File

@@ -0,0 +1,18 @@
# Advanced Topics {#openvino_docs_ie_plugin_detailed_guides}
@sphinxdirective
.. toctree::
:maxdepth: 1
:hidden:
openvino_docs_ie_plugin_dg_quantized_networks
openvino_docs_IE_DG_lpt
@endsphinxdirective
The guides below provides extra information about specific features of OpenVINO needed for understanding during OpenVINO plugin development:
* [Quantized networks](@ref openvino_docs_ie_plugin_dg_quantized_networks)
* [Low precision transformations](@ref openvino_docs_IE_DG_lpt) guide
* [Writing OpenVINO™ transformations](@ref openvino_docs_transformations) guide

View File

@@ -0,0 +1,17 @@
# Plugin API Reference {#openvino_docs_ie_plugin_api_references}
@sphinxdirective
.. toctree::
:maxdepth: 1
:hidden:
../groupie_dev_api
../groupie_transformation_api
@endsphinxdirective
The guides below provides extra API references needed for OpenVINO plugin development:
* [OpenVINO Plugin API](@ref ie_dev_api)
* [OpenVINO Transformation API](@ref ie_transformation_api)

View File

@@ -1,17 +0,0 @@
# Plugin Transformation Pipeline {#openvino_docs_IE_DG_plugin_transformation_pipeline}
@sphinxdirective
.. toctree::
:maxdepth: 1
:caption: Executable Network
:hidden:
Low Precision Transformations <openvino_docs_IE_DG_lpt>
@endsphinxdirective
Typical plugin transformation pipeline includes steps:
1. Common transformations
2. [Low precision transformations](@ref openvino_docs_IE_DG_lpt)
3. Plugin specific transformations

View File

@@ -10,6 +10,7 @@ API references available:
.. toctree::
:maxdepth: 2
../groupie_cpp_api
../groupov_cpp_api
../groupie_c_api
ie_python_api/api

View File

@@ -72,9 +72,7 @@
openvino_docs_Extensibility_UG_Intro
openvino_docs_transformations
Inference Engine Plugin Developer Guide <openvino_docs_ie_plugin_dg_overview>
groupie_dev_api
Plugin Transformation Pipeline <openvino_docs_IE_DG_plugin_transformation_pipeline>
OpenVINO Plugin Developer Guide <openvino_docs_ie_plugin_dg_overview>
.. toctree::
:maxdepth: 1

View File

@@ -79,7 +79,7 @@ EXTRA_PAGE_LIST = {}
--! is not set (otherwise, the title of intro file will be used).
--!
INDEX_TITLE = "Inference Engine C++ API Reference"
INDEX_TITLE = "OpenVINO Runtime C++ API Reference"
--!
--! File with project introduction (reStructuredText). When non-nil, this file

View File

@@ -12,7 +12,6 @@
*/
/**
* @ingroup ie_cpp_api
* @defgroup ie_transformation_api Inference Engine Transformation API
* @brief Defines Inference Engine Transformations API which is used to transform ngraph::Function
*

View File

@@ -11,6 +11,35 @@
// OPENVINO_API is used for the public API symbols. It either DLL imports or DLL exports
// (or does nothing for static build)
/**
* @defgroup ov_cpp_api OpenVINO Runtime C++ API
* OpenVINO Runtime C++ API
*
* @defgroup ov_model_cpp_api Basics
* @ingroup ov_cpp_api
* OpenVINO Core C++ API to work with ov::Model, dynamic and static shapes, types
*
* @defgroup ov_ops_cpp_api Operations
* @ingroup ov_cpp_api
* OpenVINO C++ API to create operations from different opsets. Such API is used to
* creation models from code, write transformations and traverse the model graph
*
* @defgroup ov_opset_cpp_api Operation sets
* @ingroup ov_cpp_api
* OpenVINO C++ API to work with operation sets
*
* @defgroup ov_runtime_cpp_api Inference
* @ingroup ov_cpp_api
* OpenVINO Inference C++ API provides ov::Core, ov::CompiledModel, ov::InferRequest
* and ov::Tensor classes
*/
/**
* @brief OpenVINO C++ API
* @ingroup ov_cpp_api
*/
namespace ov {} // namespace ov
#ifdef _WIN32
# pragma warning(disable : 4251)
# pragma warning(disable : 4275)

View File

@@ -34,7 +34,11 @@ class FrontEnd;
}
class ModelAccessor;
/// A user-defined model.
/**
* @brief A user-defined model
* @ingroup ov_model_cpp_api
*/
class OPENVINO_API Model : public std::enable_shared_from_this<Model> {
friend class frontend::FrontEnd;
friend OPENVINO_API std::shared_ptr<Model> clone_model(const Model& func,

View File

@@ -61,6 +61,7 @@ class Tensor;
/**
* @brief Wraps allocator implementation to provide safe way to store allocater loaded from shared library
* And constructs default based on `new` `delete` c++ calls allocator if created without parameters
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_API Allocator {
AllocatorImpl::Ptr _impl;

View File

@@ -30,8 +30,8 @@ class VariableState;
/**
* @brief Tensor API holding host memory
*
* It can throw exceptions safely for the application, where it is properly handled.
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_API Tensor {
protected:
@@ -208,6 +208,9 @@ public:
}
};
/**
* @brief A vector of Tensor's
*/
using TensorVector = std::vector<Tensor>;
namespace runtime {

View File

@@ -2,16 +2,11 @@
// SPDX-License-Identifier: Apache-2.0
//
/**
* @defgroup ie_cpp_api Inference Engine C++ API
* Inference Engine C++ API
*/
/**
* @brief The macro defines a symbol import/export mechanism essential for Microsoft Windows(R) OS.
*
* @file ie_api.h
*/
#pragma once
#if defined(OPENVINO_STATIC_LIBRARY) || defined(USE_STATIC_IE) || (defined(__GNUC__) && (__GNUC__ < 4))

View File

@@ -27,7 +27,6 @@
#include "ie_api.h"
/**
* @ingroup ie_cpp_api
* @brief Inference Engine C++ API
*/
namespace InferenceEngine {

View File

@@ -46,6 +46,7 @@ namespace ie = InferenceEngine;
/**
* @brief This type of map is used for result of Core::query_model
* @ingroup ov_runtime_cpp_api
* - `key` means operation name
* - `value` means device name supporting this operation
*/

View File

@@ -32,6 +32,7 @@ class InferRequest;
/**
* @brief This class represents a compiled model.
* @ingroup ov_runtime_cpp_api
* A model is compiled by a specific device by applying multiple optimization
* transformations, then mapping to compute kernels.
*/

View File

@@ -34,6 +34,7 @@ namespace ov {
/**
* @brief This class represents an OpenVINO runtime Core entity.
* @ingroup ov_runtime_cpp_api
* User applications can create several Core class instances, but in this case the underlying plugins
* are created multiple times and not shared between several Core instances. The recommended way is to have
* a single Core instance per application.

View File

@@ -11,16 +11,19 @@ namespace ov {
/**
* @brief Thrown in case of cancelled asynchronous operation.
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_RUNTIME_API Cancelled : public Exception {
using Exception::Exception;
};
/**
* @brief Thrown in case of calling the InferRequest methods while the request is busy with compute operation.
* @brief Thrown in case of calling the InferRequest methods while the request is
* busy with compute operation.
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_RUNTIME_API Busy : public Exception {
using Exception::Exception;
};
} // namespace ov
} // namespace ov

View File

@@ -29,6 +29,7 @@ class CompiledModel;
/**
* @brief This is a class of infer request that can be run in asynchronous or synchronous manners.
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_RUNTIME_API InferRequest {
std::shared_ptr<InferenceEngine::IInferRequestInternal> _impl;

View File

@@ -14,6 +14,12 @@
namespace ov {
/**
* @defgroup ov_runtime_gna_prop_cpp_api Intel GNA specific properties
* @ingroup ov_runtime_cpp_api
* Set of Intel GNA specific properties.
*/
/**
* @brief Namespace with Intel GNA specific properties
*/
@@ -22,12 +28,14 @@ namespace intel_gna {
/**
* @brief Property to get an std::string of GNA Library version, usually in the form
* <API_REVISION>.<RELEASE_LINE>.<RELEASE>.<BUILD>
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RO> library_full_version{"GNA_LIBRARY_FULL_VERSION"};
/**
* @brief Scale factor provided by the user to use static quantization.
* This option should be used with floating point value serialized to string with . (dot) as a decimal separator
* @ingroup ov_runtime_gna_prop_cpp_api
* @details In the case of multiple inputs, individual scale factors can be provided using the
* map where key is layer name and value is scale factor
* Example:
@@ -45,11 +53,13 @@ static constexpr Property<std::map<std::string, float>> scale_factors_per_input{
/**
* @brief if turned on, dump GNA firmware model into specified file
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<std::string> firmware_model_image_path{"GNA_FIRMWARE_MODEL_IMAGE"};
/**
* @brief Enum to define software acceleration mode
* @ingroup ov_runtime_gna_prop_cpp_api
*/
enum class ExecutionMode {
AUTO = 0, //!< Uses Intel GNA if available, otherwise uses software execution mode on CPU.
@@ -103,6 +113,7 @@ inline std::istream& operator>>(std::istream& is, ExecutionMode& execution_mode)
/**
* @brief Enum to define HW compile and execution targets
* @ingroup ov_runtime_gna_prop_cpp_api
*/
enum class HWGeneration {
UNDEFINED = 0, //!< GNA HW generation is undefined
@@ -143,6 +154,7 @@ inline std::istream& operator>>(std::istream& is, HWGeneration& hw_generation) {
/**
* @brief GNA proc_type setting that should be one of AUTO, HW, GNA_HW_WITH_SW_FBACK,
* GNA_SW_EXACT or SW_FP32
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<ExecutionMode> execution_mode{"GNA_DEVICE_MODE"};
@@ -153,22 +165,26 @@ static constexpr Property<ExecutionMode> execution_mode{"GNA_DEVICE_MODE"};
* If HW is not present, use the option corresponding to the latest fully supported GNA HW generation.
* A fully supported GNA HW generation means it must be supported by both the OV GNA Plugin and the core GNA Library.
* Currently, the latest supported GNA HW generation corresponds to GNA_3_0.
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<HWGeneration> execution_target{"GNA_HW_EXECUTION_TARGET"};
/**
* @brief The option to override the GNA HW compile target. May be one of GNA_2_0, GNA_3_0.
* By default the same as execution_target.
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<HWGeneration> compile_target{"GNA_HW_COMPILE_TARGET"};
/**
* @brief if enabled produced minimum memory footprint for compiled model in GNA memory, default value is true
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<bool> memory_reuse{"GNA_COMPACT_MODE"};
/**
* @brief Enum to define PWL design algorithm
* @ingroup ov_runtime_gna_prop_cpp_api
*/
enum class PWLDesignAlgorithm {
UNDEFINED = 0, //!< PWL approximation algorithm is undefined
@@ -213,6 +229,7 @@ inline std::istream& operator>>(std::istream& is, PWLDesignAlgorithm& pwl_design
* If value is UNIFORM_DISTRIBUTION then simple uniform distribution is used to create
* PWL approximation of activation functions.
* Uniform distribution usually gives poor approximation with the same number of segments
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<PWLDesignAlgorithm> pwl_design_algorithm{"GNA_PWL_DESIGN_ALGORITHM"};
@@ -220,6 +237,7 @@ static constexpr Property<PWLDesignAlgorithm> pwl_design_algorithm{"GNA_PWL_DESI
* @brief The option to allow to specify the maximum error percent that the optimized algorithm finding
* will be used to find PWL functions.
* By default (in case of NO value set), 1.0 value is used.
* @ingroup ov_runtime_gna_prop_cpp_api
*/
static constexpr Property<float> pwl_max_error_percent{"GNA_PWL_MAX_ERROR_PERCENT"};

View File

@@ -3,7 +3,7 @@
//
/**
* @brief a header that defines wrappers for internal GPU plugin-specific
* @brief A header that defines wrappers for internal GPU plugin-specific
* shared Video Acceleration device contexts
* and shared memory tensors which contain Video Acceleration surfaces
*
@@ -35,6 +35,7 @@ namespace ocl {
* which is shared with Direct3D 11 buffer.
* The plugin object derived from this class can be obtained with D3DContext::create_tensor() call.
* @note User can also obtain OpenCL buffer handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class D3DBufferTensor : public ClBufferTensor {
public:
@@ -62,6 +63,7 @@ public:
* which is shared with Direct3D 11 2D texture.
* The plugin object derived from this class can be obtained with D3DContext::create_tensor() call.
* @note User can also obtain OpenCL 2D image handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class D3DSurface2DTensor : public ClImage2DTensor {
public:
@@ -99,6 +101,7 @@ public:
* The plugin object derived from this class can be obtained either with
* CompiledModel::get_context() or Core::create_context() calls.
* @note User can also obtain OpenCL context handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class D3DContext : public ClContext {
public:

View File

@@ -22,6 +22,12 @@
namespace ov {
namespace intel_gpu {
/**
* @defgroup ov_runtime_ocl_gpu_cpp_api Intel GPU OpenCL interoperability
* @ingroup ov_runtime_cpp_api
* Set of C++ classes and properties to work with Remote API for Intel GPU OpenCL plugin.
*/
/**
* @brief Namespace with Intel GPU OpenCL specific remote objects
*/
@@ -29,6 +35,7 @@ namespace ocl {
/**
* @brief Shortcut for defining a handle parameter
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
using gpu_handle_param = void*;
@@ -37,6 +44,7 @@ using gpu_handle_param = void*;
* which can be shared with user-supplied OpenCL buffer.
* The plugin object derived from this class can be obtained with ClContext::create_tensor() call.
* @note User can obtain OpenCL buffer handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class ClBufferTensor : public RemoteTensor {
public:
@@ -81,6 +89,7 @@ public:
* which can be shared with user-supplied OpenCL 2D Image.
* The plugin object derived from this class can be obtained with ClContext::create_tensor() call.
* @note User can obtain OpenCL image handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class ClImage2DTensor : public RemoteTensor {
public:
@@ -125,6 +134,7 @@ public:
* which can be shared with user-supplied USM device pointer.
* The plugin object derived from this class can be obtained with ClContext::create_tensor() call.
* @note User can obtain USM pointer from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class USMTensor : public RemoteTensor {
public:
@@ -155,6 +165,7 @@ public:
* which is shared with OpenCL context object.
* The plugin object derived from this class can be obtained either with
* CompiledModel::get_context() or Core::create_context() calls.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class ClContext : public RemoteContext {
protected:

View File

@@ -33,6 +33,7 @@ namespace ocl {
* which is shared with VA output surface.
* The plugin object derived from this class can be obtained with VAContext::create_tensor() call.
* @note User can also obtain OpenCL 2D image handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class VASurfaceTensor : public ClImage2DTensor {
public:
@@ -69,6 +70,7 @@ public:
* The plugin object derived from this class can be obtained either with
* CompiledModel::get_context() or Core::create_context() calls.
* @note User can also obtain OpenCL context handle from this class.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
class VAContext : public ClContext {
public:

View File

@@ -14,6 +14,12 @@
namespace ov {
/**
* @defgroup ov_runtime_ocl_gpu_prop_cpp_api Intel GPU OpenCL specific properties
* @ingroup ov_runtime_cpp_api
* Set of Intel GPU OpenCL specific properties.
*/
/**
* @brief Namespace with Intel GPU specific properties
*/
@@ -22,22 +28,26 @@ namespace intel_gpu {
/**
* @brief Read-only property which defines size of memory in bytes available for the device. For iGPU it returns host
* memory size, for dGPU - dedicated gpu memory size
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<uint64_t, PropertyMutability::RO> device_total_mem_size{"GPU_DEVICE_TOTAL_MEM_SIZE"};
/**
* @brief Read-only property to get microarchitecture identifier in major.minor.revision format
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RO> uarch_version{"GPU_UARCH_VERSION"};
/**
* @brief Read-only property to get count of execution units for current GPU
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<int32_t, PropertyMutability::RO> execution_units_count{"GPU_EXECUTION_UNITS_COUNT"};
/**
* @brief Read-only property to get statistics of GPU memory allocated by engine for each allocation type
* It contains information about current memory usage
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<std::map<std::string, uint64_t>, PropertyMutability::RO> memory_statistics{
"GPU_MEMORY_STATISTICS"};
@@ -48,7 +58,9 @@ static constexpr Property<std::map<std::string, uint64_t>, PropertyMutability::R
* not too many iteration counts (less than 16, as a rule of thumb). Turning this key off will achieve better
* performance for both graph loading time and inference time with many iteration counts (greater than 16). Note that
* turning this key on will increase the graph loading time in proportion to the iteration counts.
* Thus, this key should be turned off if graph loading time is considered to be most important target to optimize.*/
* Thus, this key should be turned off if graph loading time is considered to be most important target to optimize.
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<bool> enable_loop_unrolling{"GPU_ENABLE_LOOP_UNROLLING"};
namespace hint {
@@ -57,6 +69,7 @@ namespace hint {
* - LOW is used for CL_QUEUE_THROTTLE_LOW_KHR OpenCL throttle hint
* - MEDIUM (DEFAULT) is used for CL_QUEUE_THROTTLE_MED_KHR OpenCL throttle hint
* - HIGH is used for CL_QUEUE_THROTTLE_HIGH_KHR OpenCL throttle hint
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
using ThrottleLevel = ov::hint::Priority;
@@ -64,6 +77,7 @@ using ThrottleLevel = ov::hint::Priority;
* @brief This key instructs the GPU plugin to use OpenCL queue throttle hints
* as defined in https://www.khronos.org/registry/OpenCL/specs/opencl-2.1-extensions.pdf,
* chapter 9.19. This option should be used with ov::intel_gpu::hint::ThrottleLevel values.
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<ThrottleLevel> queue_throttle{"GPU_QUEUE_THROTTLE"};
@@ -74,6 +88,7 @@ static constexpr Property<ThrottleLevel> queue_throttle{"GPU_QUEUE_THROTTLE"};
* - LOW is used for CL_QUEUE_PRIORITY_LOW_KHR OpenCL priority hint
* - MEDIUM (DEFAULT) is used for CL_QUEUE_PRIORITY_MED_KHR OpenCL priority hint
* - HIGH is used for CL_QUEUE_PRIORITY_HIGH_KHR OpenCL priority hint
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<ov::hint::Priority> queue_priority{"GPU_QUEUE_PRIORITY"};
@@ -83,11 +98,13 @@ static constexpr Property<ov::hint::Priority> queue_priority{"GPU_QUEUE_PRIORITY
* - LOW - instructs the GPU Plugin to use LITTLE cores if they are available
* - MEDIUM (DEFAULT) - instructs the GPU Plugin to use any available cores (BIG or LITTLE cores)
* - HIGH - instructs the GPU Plugin to use BIG cores if they are available
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<ov::hint::Priority> host_task_priority{"GPU_HOST_TASK_PRIORITY"};
/**
* @brief This key identifies available device memory size in bytes
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr Property<int64_t> available_device_mem{"AVAILABLE_DEVICE_MEM_SIZE"};
} // namespace hint
@@ -96,15 +113,32 @@ static constexpr Property<int64_t> available_device_mem{"AVAILABLE_DEVICE_MEM_SI
* @brief These keys instruct the GPU plugin to use surface/buffer memory type.
*/
namespace memory_type {
static constexpr auto surface = "GPU_SURFACE"; //!< Native video decoder surface
static constexpr auto buffer = "GPU_BUFFER"; //!< OpenCL buffer
/**
* @brief Native video decoder surface
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr auto surface = "GPU_SURFACE";
/*
* @brief OpenCL buffer
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
static constexpr auto buffer = "GPU_BUFFER";
} // namespace memory_type
/**
* @brief Possible return value for ov::device::capabilities property
*/
namespace capability {
constexpr static const auto HW_MATMUL = "GPU_HW_MATMUL"; //!< Device has hardware block for matrix multiplication
/**
* @brief Device has hardware block for matrix multiplication
* @ingroup ov_runtime_ocl_gpu_prop_cpp_api
*/
constexpr static const auto HW_MATMUL = "GPU_HW_MATMUL";
} // namespace capability
} // namespace intel_gpu
} // namespace ov

View File

@@ -19,6 +19,7 @@ using gpu_handle_param = void*;
/**
* @brief Enum to define the type of the shared context
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
enum class ContextType {
OCL = 0, //!< Pure OpenCL context
@@ -54,40 +55,47 @@ inline std::istream& operator>>(std::istream& is, ContextType& context_type) {
/**
* @brief Shared device context type: can be either pure OpenCL (OCL)
* or shared video decoder (VA_SHARED) context
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<ContextType> context_type{"CONTEXT_TYPE"};
/**
* @brief This key identifies OpenCL context handle
* in a shared context or shared memory blob parameter map
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<gpu_handle_param> ocl_context{"OCL_CONTEXT"};
/**
* @brief This key identifies ID of device in OpenCL context
* if multiple devices are present in the context
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<int> ocl_context_device_id{"OCL_CONTEXT_DEVICE_ID"};
/**
* @brief In case of multi-tile system,
* this key identifies tile within given context
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<int> tile_id{"TILE_ID"};
/**
* @brief This key identifies OpenCL queue handle in a shared context
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<gpu_handle_param> ocl_queue{"OCL_QUEUE"};
/**
* @brief This key identifies video acceleration device/display handle
* in a shared context or shared memory blob parameter map
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<gpu_handle_param> va_device{"VA_DEVICE"};
/**
* @brief Enum to define the type of the shared memory buffer
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
enum class SharedMemType {
OCL_BUFFER = 0, //!< Shared OpenCL buffer blob
@@ -148,18 +156,21 @@ inline std::istream& operator>>(std::istream& is, SharedMemType& share_mem_type)
/**
* @brief This key identifies type of internal shared memory
* in a shared memory blob parameter map.
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<SharedMemType> shared_mem_type{"SHARED_MEM_TYPE"};
/**
* @brief This key identifies OpenCL memory handle
* in a shared memory blob parameter map
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<gpu_handle_param> mem_handle{"MEM_HANDLE"};
/**
* @brief This key identifies video decoder surface handle
* in a shared memory blob parameter map
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
#ifdef _WIN32
static constexpr Property<gpu_handle_param> dev_object_handle{"DEV_OBJECT_HANDLE"};
@@ -170,6 +181,7 @@ static constexpr Property<uint32_t> dev_object_handle{"DEV_OBJECT_HANDLE"};
/**
* @brief This key identifies video decoder surface plane
* in a shared memory blob parameter map
* @ingroup ov_runtime_ocl_gpu_cpp_api
*/
static constexpr Property<uint32_t> va_plane{"VA_PLANE"};

View File

@@ -18,68 +18,81 @@ namespace hddl {
/**
* @brief Property to get a int of the device number
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<int, PropertyMutability::RO> device_num{"HDDL_DEVICE_NUM"};
/**
* @brief Property to get a std::vector<std::string> of device names
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> device_name{"HDDL_DEVICE_NAME"};
/**
* @brief Property to get a std::vector<float> of device thermal
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<float>, PropertyMutability::RO> device_thermal{"HDDL_DEVICE_THERMAL"};
/**
* @brief Property to get a std::vector<uint32> of device ids
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<unsigned int>, PropertyMutability::RO> device_id{"HDDL_DEVICE_ID"};
/**
* @brief Property to get a std::vector<int> of device subclasses
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<int>, PropertyMutability::RO> device_subclass{"HDDL_DEVICE_SUBCLASS"};
/**
* @brief Property to get a std::vector<uint32> of device total memory
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<unsigned int>, PropertyMutability::RO> device_memory_total{
"HDDL_DEVICE_MEMORY_TOTAL"};
/**
* @brief Property to get a std::vector<uint32> of device used memory
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<unsigned int>, PropertyMutability::RO> device_memory_used{
"HDDL_DEVICE_MEMORY_USED"};
/**
* @brief Property to get a std::vector<float> of device utilization
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<float>, PropertyMutability::RO> device_utilization{"HDDL_DEVICE_UTILIZATION"};
/**
* @brief Property to get a std::vector<std::string> of stream ids
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> stream_id{"HDDL_STREAM_ID"};
/**
* @brief Property to get a std::vector<std::string> of device tags
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> device_tag{"HDDL_DEVICE_TAG"};
/**
* @brief Property to get a std::vector<int> of group ids
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::vector<int>, PropertyMutability::RO> group_id{"HDDL_GROUP_ID"};
/**
* @brief Property to get a int number of device be using for group
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<int, PropertyMutability::RO> device_group_using_num{"HDDL_DEVICE_GROUP_USING_NUM"};
/**
* @brief Property to get a int number of total device
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<int, PropertyMutability::RO> device_total_num{"HDDL_DEVICE_TOTAL_NUM"};
@@ -100,6 +113,7 @@ static constexpr Property<int, PropertyMutability::RO> device_total_num{"HDDL_DE
* }
* }
* It means that an executable network marked with tagA will be executed on 3 devices
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> graph_tag{"HDDL_GRAPH_TAG"};
@@ -116,6 +130,7 @@ static constexpr Property<std::string, PropertyMutability::RW> graph_tag{"HDDL_G
* "stream_device_number":5
* }
* It means that 5 device will be used for stream-affinity
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> set_stream_id{"HDDL_SET_STREAM_ID"};
@@ -132,6 +147,7 @@ static constexpr Property<std::string, PropertyMutability::RW> set_stream_id{"HD
* "bypass_device_number": 5
* }
* It means that 5 device will be used for Bypass scheduler.
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> set_device_tag{"HDDL_SET_DEVICE_TAG"};
@@ -145,6 +161,7 @@ static constexpr Property<std::string, PropertyMutability::RW> set_device_tag{"H
* If "NO", the network allocated is not bind to the device (with the specified "DEVICE_TAG"). If the same network
* is allocated on multiple other devices (also set BIND_DEVICE to "False"), then inference through any handle of these
* networks may be executed on any of these devices those have the network loaded.
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<bool, PropertyMutability::RW> bind_device{"HDDL_BIND_DEVICE"};
@@ -155,6 +172,7 @@ static constexpr Property<bool, PropertyMutability::RW> bind_device{"HDDL_BIND_D
* When there are multiple devices running a certain network (a same network running on multiple devices in Bypass
* Scheduler), the device with a larger number has a higher priority, and more inference tasks will be fed to it with
* priority.
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> runtime_priority{"HDDL_RUNTIME_PRIORITY"};
@@ -164,6 +182,7 @@ static constexpr Property<std::string, PropertyMutability::RW> runtime_priority{
* SGAD is short for "Single Graph All Device". With this scheduler, once application allocates 1 network, all devices
* (managed by SGAD scheduler) will be loaded with this graph. The number of network that can be loaded to one device
* can exceed one. Once application deallocates 1 network from device, all devices will unload the network from them.
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<bool, PropertyMutability::RW> use_sgad{"HDDL_USE_SGAD"};
@@ -173,6 +192,7 @@ static constexpr Property<bool, PropertyMutability::RW> use_sgad{"HDDL_USE_SGAD"
* This config gives a "group id" for a certain device when this device has been reserved for certain client, client
* can use this device grouped by calling this group id while other client can't use this device
* Each device has their own group id. Device in one group shares same group id.
* @ingroup ov_runtime_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> group_device{"HDDL_GROUP_DEVICE"};

View File

@@ -9,6 +9,20 @@
namespace ov {
/**
* @defgroup ov_runtime_myriad_hddl_prop_cpp_api Intel MYRIAD & HDDL specific properties
* @ingroup ov_runtime_cpp_api
* Set of Intel MYRIAD & HDDL specific properties.
*
* @defgroup ov_runtime_myriad_prop_cpp_api Intel MYRIAD specific properties
* @ingroup ov_runtime_cpp_api
* Set of Intel MYRIAD specific properties.
*
* @defgroup ov_runtime_hddl_prop_cpp_api Intel HDDL specific properties
* @ingroup ov_runtime_cpp_api
* Set of Intel HDDL specific properties.
*/
/**
* @brief Namespace with Intel MYRIAD specific properties
*/
@@ -16,11 +30,13 @@ namespace intel_myriad {
/**
* @brief Turn on HW stages usage (applicable for MyriadX devices only).
* @ingroup ov_runtime_myriad_hddl_prop_cpp_api
*/
static constexpr Property<bool, PropertyMutability::RW> enable_hw_acceleration{"MYRIAD_ENABLE_HW_ACCELERATION"};
/**
* @brief The flag for adding to the profiling information the time of obtaining a tensor.
* @ingroup ov_runtime_myriad_hddl_prop_cpp_api
*/
static constexpr Property<bool, PropertyMutability::RW> enable_receiving_tensor_time{
"MYRIAD_ENABLE_RECEIVING_TENSOR_TIME"};
@@ -28,11 +44,13 @@ static constexpr Property<bool, PropertyMutability::RW> enable_receiving_tensor_
/**
* @brief This option allows to pass custom layers binding xml.
* If layer is present in such an xml, it would be used during inference even if the layer is natively supported
* @ingroup ov_runtime_myriad_hddl_prop_cpp_api
*/
static constexpr Property<std::string, PropertyMutability::RW> custom_layers{"MYRIAD_CUSTOM_LAYERS"};
/**
* @brief Enum to define possible device protocols
* @ingroup ov_runtime_myriad_hddl_prop_cpp_api
*/
enum class Protocol {
PCIE = 0, //!< Will use a device with PCIE protocol
@@ -68,16 +86,19 @@ inline std::istream& operator>>(std::istream& is, Protocol& protocol) {
/**
* @brief This option allows to specify protocol.
* @ingroup ov_runtime_myriad_prop_cpp_api
*/
static constexpr Property<Protocol, PropertyMutability::RW> protocol{"MYRIAD_PROTOCOL"};
/**
* @brief The flag to reset stalled devices.
* @ingroup ov_runtime_myriad_prop_cpp_api
*/
static constexpr Property<bool, PropertyMutability::RW> enable_force_reset{"MYRIAD_ENABLE_FORCE_RESET"};
/**
* @brief Enum to define possible device mymory types
* @ingroup ov_runtime_myriad_prop_cpp_api
*/
enum class DDRType {
MYRIAD_DDR_AUTO = 0, //!< Automatic setting of DDR memory type
@@ -127,8 +148,8 @@ inline std::istream& operator>>(std::istream& is, DDRType& ddrType) {
/**
* @brief This option allows to specify device memory type.
* @ingroup ov_runtime_myriad_prop_cpp_api
*/
static constexpr Property<DDRType, PropertyMutability::RW> ddr_type{"MYRIAD_DDR_TYPE"};
} // namespace intel_myriad
} // namespace ov

View File

@@ -18,6 +18,7 @@ namespace ov {
/**
* @struct ProfilingInfo
* @brief Represents basic inference profiling information per operation.
* @ingroup ov_runtime_cpp_api
*
* If the operation is executed using tiling, the sum time per each tile is indicated as the total execution time.
* Due to parallel execution, the total execution time for all nodes might be greater than the total inference time.
@@ -41,6 +42,7 @@ struct ProfilingInfo {
* @brief The absolute time, in microseconds, that the node ran (in total).
*/
std::chrono::microseconds real_time;
/**
* @brief The net host CPU time that the node ran.
*/

View File

@@ -23,6 +23,11 @@
namespace ov {
/**
* @defgroup ov_runtime_cpp_prop_api Device properties
* @ingroup ov_runtime_cpp_api
*/
/**
* @brief Enum to define property value mutability
*/
@@ -197,25 +202,27 @@ struct Property<T, PropertyMutability::RO> : public util::BaseProperty<T, Proper
/**
* @brief Read-only property to get a std::vector<PropertyName> of supported read-only properties.
*
* This can be used as a compiled model property as well.
*
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::vector<PropertyName>, PropertyMutability::RO> supported_properties{
"SUPPORTED_PROPERTIES"};
/**
* @brief Read-only property to get a std::vector<std::string> of available device IDs
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> available_devices{"AVAILABLE_DEVICES"};
/**
* @brief Read-only property to get a name of name of a model
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::string, PropertyMutability::RO> model_name{"NETWORK_NAME"};
/**
* @brief Read-only property to get an unsigned integer value of optimal number of compiled model infer requests.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<uint32_t, PropertyMutability::RO> optimal_number_of_infer_requests{
"OPTIMAL_NUMBER_OF_INFER_REQUESTS"};
@@ -227,17 +234,19 @@ namespace hint {
/**
* @brief Hint for device to use specified precision for inference
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<element::Type, PropertyMutability::RW> inference_precision{"INFERENCE_PRECISION_HINT"};
/**
* @brief Enum to define possible priorities hints
* @ingroup ov_runtime_cpp_prop_api
*/
enum class Priority {
LOW = 0,
MEDIUM = 1,
HIGH = 2,
DEFAULT = MEDIUM,
LOW = 0, //!< Low priority
MEDIUM = 1, //!< Medium priority
HIGH = 2, //!< High priority
DEFAULT = MEDIUM, //!< Default priority is MEDIUM
};
/** @cond INTERNAL */
@@ -273,17 +282,19 @@ inline std::istream& operator>>(std::istream& is, Priority& priority) {
/**
* @brief High-level OpenVINO model priority hint
* Defines what model should be provided with more performant bounded resource first
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<Priority> model_priority{"MODEL_PRIORITY"};
/**
* @brief Enum to define possible performance mode hints
* @ingroup ov_runtime_cpp_prop_api
*/
enum class PerformanceMode {
UNDEFINED = -1,
LATENCY = 1,
THROUGHPUT = 2,
CUMULATIVE_THROUGHPUT = 3,
UNDEFINED = -1, //!< Undefined value, performance setting may vary from device to device
LATENCY = 1, //!< Optimize for latency
THROUGHPUT = 2, //!< Optimize for throughput
CUMULATIVE_THROUGHPUT = 3, //!< Optimize for cumulative throughput
};
/** @cond INTERNAL */
@@ -324,6 +335,7 @@ inline std::istream& operator>>(std::istream& is, PerformanceMode& performance_m
* @brief High-level OpenVINO Performance Hints
* unlike low-level properties that are individual (per-device), the hints are something that every device accepts
* and turns into device-specific settings
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<PerformanceMode> performance_mode{"PERFORMANCE_HINT"};
@@ -331,25 +343,27 @@ static constexpr Property<PerformanceMode> performance_mode{"PERFORMANCE_HINT"};
* @brief (Optional) property that backs the (above) Performance Hints
* by giving additional information on how many inference requests the application will be keeping in flight
* usually this value comes from the actual use-case (e.g. number of video-cameras, or other sources of inputs)
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<uint32_t> num_requests{"PERFORMANCE_HINT_NUM_REQUESTS"};
/**
* @brief This key identifies shared pointer to the ov::Model, required for some properties (ov::max_batch_size and
* ov::optimal_batch_size)
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::shared_ptr<ov::Model>> model{"MODEL_PTR"};
/**
* @brief Special key for auto batching feature configuration. Enabled by default
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<bool, PropertyMutability::RW> allow_auto_batching{"ALLOW_AUTO_BATCHING"};
} // namespace hint
/**
* @brief The name for setting performance counters option.
*
* It is passed to Core::set_property()
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<bool> enable_profiling{"PERF_COUNT"};
@@ -360,6 +374,7 @@ namespace log {
/**
* @brief Enum to define possible log levels
* @ingroup ov_runtime_cpp_prop_api
*/
enum class Level {
NO = -1, //!< disable any logging
@@ -414,12 +429,14 @@ inline std::istream& operator>>(std::istream& is, Level& level) {
/**
* @brief the property for setting desirable log level.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<Level> level{"LOG_LEVEL"};
} // namespace log
/**
* @brief This property defines the directory which will be used to store any data cached by plugins.
* @ingroup ov_runtime_cpp_prop_api
*
* The underlying cache structure is not defined and might differ between OpenVINO releases
* Cached data might be platform / device specific and might be invalid after OpenVINO version change
@@ -440,6 +457,7 @@ static constexpr Property<std::string> cache_dir{"CACHE_DIR"};
/**
* @brief Read-only property to provide information about a range for streams on platforms where streams are supported.
* @ingroup ov_runtime_cpp_prop_api
*
* Property returns a value of std::tuple<unsigned int, unsigned int> type, where:
* - First value is bottom bound.
@@ -450,6 +468,7 @@ static constexpr Property<std::tuple<unsigned int, unsigned int>, PropertyMutabi
/**
* @brief Read-only property to query information optimal batch size for the given device and the network
* @ingroup ov_runtime_cpp_prop_api
*
* Property returns a value of unsigned int type,
* Returns optimal batch size for a given network on the given device. The returned value is aligned to power of 2.
@@ -464,18 +483,21 @@ static constexpr Property<unsigned int, PropertyMutability::RO> optimal_batch_si
/**
* @brief Read-only property to get maximum batch size which does not cause performance degradation due to memory swap
* impact.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<uint32_t, PropertyMutability::RO> max_batch_size{"MAX_BATCH_SIZE"};
/**
* @brief Read-write property to set the timeout used to collect the inputs for the auto-batching
* impact.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<uint32_t, PropertyMutability::RW> auto_batch_timeout{"AUTO_BATCH_TIMEOUT"};
/**
* @brief Read-only property to provide a hint for a range for number of async infer requests. If device supports
* streams, the metric provides range for number of IRs per stream.
* @ingroup ov_runtime_cpp_prop_api
*
* Property returns a value of std::tuple<unsigned int, unsigned int, unsigned int> type, where:
* - First value is bottom bound.
@@ -493,11 +515,13 @@ namespace device {
/**
* @brief the property for setting of required device to execute on
* values: device id starts from "0" - first device, "1" - second device, etc
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::string> id{"DEVICE_ID"};
/**
* @brief Type for device Priorities config option, with comma-separated devices listed in the desired priority
* @ingroup ov_runtime_cpp_prop_api
*/
struct Priorities : public Property<std::string> {
private:
@@ -528,11 +552,13 @@ public:
/**
* @brief Device Priorities config option, with comma-separated devices listed in the desired priority
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Priorities priorities{"MULTI_DEVICE_PRIORITIES"};
/**
* @brief Type for property to pass set of properties to specified device
* @ingroup ov_runtime_cpp_prop_api
*/
struct Properties {
/**
@@ -562,6 +588,7 @@ struct Properties {
/**
* @brief Property to pass set of property values to specified device
* @ingroup ov_runtime_cpp_prop_api
* Usage Example:
* @code
* core.compile_model("HETERO"
@@ -574,16 +601,19 @@ static constexpr Properties properties;
/**
* @brief Read-only property to get a std::string value representing a full device name.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::string, PropertyMutability::RO> full_name{"FULL_DEVICE_NAME"};
/**
* @brief Read-only property which defines the device architecture.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::string, PropertyMutability::RO> architecture{"DEVICE_ARCHITECTURE"};
/**
* @brief Enum to define possible device types
* @ingroup ov_runtime_cpp_prop_api
*/
enum class Type {
INTEGRATED = 0, //!< Device is integrated into host system
@@ -618,22 +648,26 @@ inline std::istream& operator>>(std::istream& is, Type& device_type) {
/**
* @brief Read-only property to get a type of device. See Type enum definition for possible return values
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<Type, PropertyMutability::RO> type{"DEVICE_TYPE"};
/**
* @brief Read-only property which defines Giga OPS per second count (GFLOPS or GIOPS) for a set of precisions supported
* by specified device
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::map<element::Type, float>, PropertyMutability::RO> gops{"DEVICE_GOPS"};
/**
* @brief Read-only property to get a float of device thermal
* @brief Read-only property to get a float of device thermal
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<float, PropertyMutability::RO> thermal{"DEVICE_THERMAL"};
/**
* @brief Read-only property to get a std::vector<std::string> of capabilities options per device.
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> capabilities{"OPTIMIZATION_CAPABILITIES"};
@@ -641,6 +675,10 @@ static constexpr Property<std::vector<std::string>, PropertyMutability::RO> capa
* @brief Namespace with possible values for ov::device::capabilities property
*/
namespace capability {
/**
* @addtogroup ov_runtime_cpp_prop_api
* @{
*/
constexpr static const auto FP32 = "FP32"; //!< Device supports fp32 inference
constexpr static const auto BF16 = "BF16"; //!< Device supports bf16 inference
constexpr static const auto FP16 = "FP16"; //!< Device supports fp16 inference
@@ -649,6 +687,7 @@ constexpr static const auto INT16 = "INT16"; //!< Device suppor
constexpr static const auto BIN = "BIN"; //!< Device supports binary inference
constexpr static const auto WINOGRAD = "WINOGRAD"; //!< Device supports winograd optimization
constexpr static const auto EXPORT_IMPORT = "EXPORT_IMPORT"; //!< Device supports compiled model export and import
/** @}*/
} // namespace capability
} // namespace device
@@ -659,6 +698,7 @@ constexpr static const auto EXPORT_IMPORT = "EXPORT_IMPORT"; //!< Device suppor
namespace streams {
/**
* @brief Class to represent number of streams in streams executor
* @ingroup ov_runtime_cpp_prop_api
*/
struct Num {
using Base = std::tuple<int32_t>; //!< NumStreams is representable as int32_t
@@ -676,12 +716,21 @@ struct Num {
/**
* @brief The number of executor logical partitions
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<Num, PropertyMutability::RW> num{"NUM_STREAMS"};
static constexpr Num AUTO{-1}; //!< Creates bare minimum of streams to improve the performance
static constexpr Num NUMA{
-2}; //!< Creates as many streams as needed to accommodate NUMA and avoid associated penalties
/**
* @brief Creates bare minimum of streams to improve the performance
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Num AUTO{-1};
/**
* @brief Creates as many streams as needed to accommodate NUMA and avoid associated penalties
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Num NUMA{-2};
/** @cond INTERNAL */
inline std::ostream& operator<<(std::ostream& os, const Num& num_val) {
@@ -716,21 +765,25 @@ inline std::istream& operator>>(std::istream& is, Num& num_val) {
/**
* @brief The number of executor logical partitions
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<streams::Num, PropertyMutability::RW> num_streams{"NUM_STREAMS"};
/**
* @brief Maximum number of threads that can be used for inference tasks
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<int32_t, PropertyMutability::RW> inference_num_threads{"INFERENCE_NUM_THREADS"};
/**
* @brief Maximum number of threads that can be used for compilation tasks
* @ingroup ov_runtime_cpp_prop_api
*/
static constexpr Property<int32_t, PropertyMutability::RW> compilation_num_threads{"COMPILATION_NUM_THREADS"};
/**
* @brief Enum to define possible affinity patterns
* @ingroup ov_runtime_cpp_prop_api
*/
enum class Affinity {
NONE = -1, //!< Disable threads affinity pinning
@@ -777,6 +830,7 @@ inline std::istream& operator>>(std::istream& is, Affinity& affinity) {
/**
* @brief The name for setting CPU affinity per thread option.
* @ingroup ov_runtime_cpp_prop_api
* @note The setting is ignored, if the OpenVINO compiled with OpenMP and any affinity-related OpenMP's
* environment variable is set (as affinity is configured explicitly)
*/

View File

@@ -29,6 +29,7 @@ class CompiledModel;
/**
* @brief This class represents an abstraction
* @ingroup ov_runtime_cpp_api
* for remote (non-CPU) accelerator device-specific inference context.
* Such context represents a scope on the device within which compiled
* models and remote memory tensors can exist, function, and exchange data.

View File

@@ -17,7 +17,8 @@ namespace ov {
class RemoteContext;
/**
* @brief Remote memory access and interpretation API.
* @brief Remote memory access and interoperability API.
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_RUNTIME_API RemoteTensor : public Tensor {
using Tensor::Tensor;

View File

@@ -25,6 +25,7 @@ class InferRequest;
/**
* @brief VariableState class
* @ingroup ov_runtime_cpp_api
*/
class OPENVINO_RUNTIME_API VariableState {
std::shared_ptr<InferenceEngine::IVariableStateInternal> _impl;