Device properties

Overview

// enums

enum ov::hint::ExecutionMode;
enum ov::log::Level;
enum ov::hint::PerformanceMode;
enum ov::hint::Priority;
enum ov::device::Type;

// structs

struct ov::device::LUID;
struct ov::streams::Num;
struct ov::device::Priorities;
struct ov::device::Properties;
struct ov::device::UUID;

// global variables

static constexpr Property<std::string> ov::device::id {"DEVICE_ID"};
static constexpr Priorities ov::device::priorities {"MULTI_DEVICE_PRIORITIES"};
static constexpr Properties ov::device::properties {"DEVICE_PROPERTIES"};
static constexpr Property<std::string, PropertyMutability::RO> ov::device::full_name {"FULL_DEVICE_NAME"};
static constexpr Property<std::string, PropertyMutability::RO> ov::device::architecture {"DEVICE_ARCHITECTURE"};
static constexpr Property<UUID, PropertyMutability::RO> ov::device::uuid {"DEVICE_UUID"};
static constexpr Property<LUID, PropertyMutability::RO> ov::device::luid {"DEVICE_LUID"};
static constexpr Property<Type, PropertyMutability::RO> ov::device::type {"DEVICE_TYPE"};
static constexpr Property<std::map<element::Type, float>, PropertyMutability::RO> ov::device::gops {"DEVICE_GOPS"};
static constexpr Property<float, PropertyMutability::RO> ov::device::thermal {"DEVICE_THERMAL"};
static constexpr Property<std::vector<std::string>, PropertyMutability::RO> ov::device::capabilities {"OPTIMIZATION_CAPABILITIES"};
static constexpr static const auto ov::device::capability::FP32 = "FP32";
static constexpr static const auto ov::device::capability::BF16 = "BF16";
static constexpr static const auto ov::device::capability::FP16 = "FP16";
static constexpr static const auto ov::device::capability::INT8 = "INT8";
static constexpr static const auto ov::device::capability::INT16 = "INT16";
static constexpr static const auto ov::device::capability::BIN = "BIN";
static constexpr static const auto ov::device::capability::WINOGRAD = "WINOGRAD";
static constexpr static const auto ov::device::capability::EXPORT_IMPORT = "EXPORT_IMPORT";
static constexpr Property<element::Type, PropertyMutability::RW> ov::hint::inference_precision {"INFERENCE_PRECISION_HINT"};
static constexpr Property<Priority> ov::hint::model_priority {"MODEL_PRIORITY"};
static constexpr Property<PerformanceMode> ov::hint::performance_mode {"PERFORMANCE_HINT"};
static constexpr Property<SchedulingCoreType> ov::hint::scheduling_core_type {"SCHEDULING_CORE_TYPE"};
static constexpr Property<bool> ov::hint::enable_cpu_pinning {"ENABLE_CPU_PINNING"};
static constexpr Property<bool> ov::hint::enable_hyper_threading {"ENABLE_HYPER_THREADING"};
static constexpr Property<uint32_t> ov::hint::num_requests {"PERFORMANCE_HINT_NUM_REQUESTS"};
static constexpr Property<std::shared_ptr<ov::Model>> ov::hint::model {"MODEL_PTR"};
static constexpr Property<bool, PropertyMutability::RW> ov::hint::allow_auto_batching {"ALLOW_AUTO_BATCHING"};
static constexpr Property<ExecutionMode> ov::hint::execution_mode {"EXECUTION_MODE_HINT"};
static constexpr Property<std::vector<PropertyName>, PropertyMutability::RO> ov::internal::supported_properties {     "INTERNAL_SUPPORTED_PROPERTIES"};
static constexpr Property<Level> ov::log::level {"LOG_LEVEL"};
static constexpr Property<Num, PropertyMutability::RW> ov::streams::num {"NUM_STREAMS"};
static constexpr Num ov::streams::AUTO {-1};
static constexpr Num ov::streams::NUMA {-2};

Detailed Documentation

Global Variables

static constexpr Property<std::string> ov::device::id {"DEVICE_ID"}

the property for setting of required device to execute on values: device id starts from “0” - first device, “1” - second device, etc

static constexpr Priorities ov::device::priorities {"MULTI_DEVICE_PRIORITIES"}

Device Priorities config option, with comma-separated devices listed in the desired priority.

static constexpr Properties ov::device::properties {"DEVICE_PROPERTIES"}

Property to pass set of property values to specified device

Usage Example:

core.compile_model("HETERO"
    ov::device::priorities("GPU", "CPU"),
    ov::device::properties("CPU", ov::enable_profiling(true)),
    ov::device::properties("GPU", ov::enable_profiling(false)));
static constexpr Property<std::string, PropertyMutability::RO> ov::device::full_name {"FULL_DEVICE_NAME"}

Read-only property to get a std::string value representing a full device name.

static constexpr Property<std::string, PropertyMutability::RO> ov::device::architecture {"DEVICE_ARCHITECTURE"}

Read-only property which defines the device architecture.

static constexpr Property<UUID, PropertyMutability::RO> ov::device::uuid {"DEVICE_UUID"}

Read-only property which defines the UUID of the device.

static constexpr Property<LUID, PropertyMutability::RO> ov::device::luid {"DEVICE_LUID"}

Read-only property which defines the LUID of the device.

static constexpr Property<Type, PropertyMutability::RO> ov::device::type {"DEVICE_TYPE"}

Read-only property to get a type of device. See Type enum definition for possible return values.

static constexpr Property<std::map<element::Type, float>, PropertyMutability::RO> ov::device::gops {"DEVICE_GOPS"}

Read-only property which defines Giga OPS per second count (GFLOPS or GIOPS) for a set of precisions supported by specified device.

static constexpr Property<float, PropertyMutability::RO> ov::device::thermal {"DEVICE_THERMAL"}

Read-only property to get a float of device thermal.

static constexpr Property<std::vector<std::string>, PropertyMutability::RO> ov::device::capabilities {"OPTIMIZATION_CAPABILITIES"}

Read-only property to get a std::vector<std::string> of capabilities options per device.

static constexpr static const auto ov::device::capability::FP32 = "FP32"

Device supports fp32 inference.

static constexpr static const auto ov::device::capability::BF16 = "BF16"

Device supports bf16 inference.

static constexpr static const auto ov::device::capability::FP16 = "FP16"

Device supports fp16 inference.

static constexpr static const auto ov::device::capability::INT8 = "INT8"

Device supports int8 inference.

static constexpr static const auto ov::device::capability::INT16 = "INT16"

Device supports int16 inference.

static constexpr static const auto ov::device::capability::BIN = "BIN"

Device supports binary inference.

static constexpr static const auto ov::device::capability::WINOGRAD = "WINOGRAD"

Device supports winograd optimization.

static constexpr static const auto ov::device::capability::EXPORT_IMPORT = "EXPORT_IMPORT"

Device supports compiled model export and import.

static constexpr Property<element::Type, PropertyMutability::RW> ov::hint::inference_precision {"INFERENCE_PRECISION_HINT"}

Hint for device to use specified precision for inference.

static constexpr Property<Priority> ov::hint::model_priority {"MODEL_PRIORITY"}

High-level OpenVINO model priority hint Defines what model should be provided with more performant bounded resource first.

static constexpr Property<PerformanceMode> ov::hint::performance_mode {"PERFORMANCE_HINT"}

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.

static constexpr Property<SchedulingCoreType> ov::hint::scheduling_core_type {"SCHEDULING_CORE_TYPE"}

This property defines CPU core type which can be used during inference.

Developer can use this property to select specific CPU cores for inference. Please refer SchedulingCoreType for all definition of core type.

The following code is an example to only use efficient-cores for inference on hybrid CPU. If user sets this configuration on a platform with only performance-cores, CPU inference will still run on the performance-cores.

static constexpr Property<bool> ov::hint::enable_cpu_pinning {"ENABLE_CPU_PINNING"}

This property allows CPU threads pinning during inference.

Developer can use this property to use or not use CPU threads pinning during inference. If user does not explicitly set value for this property, OpenVINO may choose any desired value based on internal logic.

The following code is example to use this property.

ie.set_property(ov::hint::enable_cpu_pinning(true));
ie.set_property(ov::hint::enable_cpu_pinning(false));
static constexpr Property<bool> ov::hint::enable_hyper_threading {"ENABLE_HYPER_THREADING"}

This property define if using hyper threading during inference.

Developer can use this property to use or not use CPU pinning during inference. If user does not explicitly set value for this property, OpenVINO may choose any desired value based on internal logic.

The following code is example to use this property.

ie.set_property(ov::hint::enable_hyper_threading(true));
ie.set_property(ov::hint::enable_hyper_threading(false));
static constexpr Property<uint32_t> ov::hint::num_requests {"PERFORMANCE_HINT_NUM_REQUESTS"}

(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)

static constexpr Property<std::shared_ptr<ov::Model>> ov::hint::model {"MODEL_PTR"}

This key identifies shared pointer to the ov::Model, required for some properties (ov::max_batch_size and ov::optimal_batch_size)

static constexpr Property<bool, PropertyMutability::RW> ov::hint::allow_auto_batching {"ALLOW_AUTO_BATCHING"}

Special key for auto batching feature configuration. Enabled by default.

static constexpr Property<ExecutionMode> ov::hint::execution_mode {"EXECUTION_MODE_HINT"}

High-level OpenVINO Execution hint unlike low-level properties that are individual (per-device), the hints are something that every device accepts and turns into device-specific settings Execution mode hint controls preferred optimization targets (performance or accuracy) for given model.

static constexpr Property<std::vector<PropertyName>, PropertyMutability::RO> ov::internal::supported_properties {     "INTERNAL_SUPPORTED_PROPERTIES"}

Read-only property to get a std::vector<PropertyName> of supported internal properties.

static constexpr Property<Level> ov::log::level {"LOG_LEVEL"}

the property for setting desirable log level.

static constexpr Property<Num, PropertyMutability::RW> ov::streams::num {"NUM_STREAMS"}

The number of executor logical partitions.

static constexpr Num ov::streams::AUTO {-1}

Creates bare minimum of streams to improve the performance.

static constexpr Num ov::streams::NUMA {-2}

Creates as many streams as needed to accommodate NUMA and avoid associated penalties.