Struct ov::threading::IStreamsExecutor::Config

struct Config

Defines IStreamsExecutor configuration.

Public Types

enum class StreamsMode

This enum contains definition of each sub streams mode, indicating the main stream situation.

Values:

enumerator SUB_STREAMS_NULL

Do not create sub streams.

enumerator SUB_STREAMS_FOR_SOCKET

Create sub streams for multiple sockets in main stream.

enumerator LATENCY

latency mode

enumerator THROUGHPUT

throughput mode

Public Functions

inline Config(std::string name = "StreamsExecutor", int streams = 1, int threadsPerStream = 0, ThreadBindingType threadBindingType = ThreadBindingType::NONE, int threadBindingStep = 1, int threadBindingOffset = 0, int threads = 0, PreferredCoreType threadPreferredCoreType = PreferredCoreType::ANY, std::vector<std::vector<int>> streamsInfoTable = {}, bool cpuReservation = false)

A constructor with arguments.

Parameters
  • name[in] The executor name

  • streams[in]

  • threadsPerStream[in]

  • threadBindingType[in]

  • threadBindingStep[in]

  • threadBindingOffset[in]

  • threads[in]

  • threadPreferredCoreType[in]

  • streamsInfoTable[in]

  • cpuReservation[in]

void set_property(const ov::AnyMap &properties)

Sets configuration.

Parameters

properties – map of properties

void set_property(const std::string &key, const ov::Any &value)

Sets configuration.

Parameters
  • key – property name

  • value – property value

ov::Any get_property(const std::string &key) const

Return configuration value.

Parameters

key – configuration key

Returns

configuration value wrapped into ov::Any

Public Static Functions

static Config make_default_multi_threaded(const Config &initial)

Create appropriate multithreaded configuration filing unconfigured values from initial configuration using hardware properties.

Parameters

initial – Inital configuration

Returns

configured values

static Config reserve_cpu_threads(const Config &initial)

Get and reserve cpu ids based on configuration and hardware information streams_info_table must be present in the configuration.

Parameters

initial – Inital configuration

Returns

configured values