struct ov::threading::IStreamsExecutor::Config¶
Overview¶
Defines IStreamsExecutor configuration. More…
#include <istreams_executor.hpp>
struct Config
{
// enums
enum PreferredCoreType;
enum StreamMode;
// fields
std::string _name;
int _streams = 1;
int _threadsPerStream = 0;
ThreadBindingType _threadBindingType = ThreadBindingType::NONE;
int _threadBindingStep = 1;
int _threadBindingOffset = 0;
int _threads = 0;
int _big_core_streams = 0;
int _small_core_streams = 0;
int _threads_per_stream_big = 0;
int _threads_per_stream_small = 0;
int _small_core_offset = 0;
bool _enable_hyper_thread = true;
int _plugin_task = NOT_USED;
enum ov::threading::IStreamsExecutor::Config::PreferredCoreType _threadPreferredCoreType = PreferredCoreType::ANY;
std::vector<std::vector<int>> _streams_info_table = {};
std::vector<std::vector<int>> _stream_processor_ids;
bool _cpu_reservation = false;
bool _streams_changed = false;
// construction
Config(, , , , , , , , , );
// methods
voidconst ov::AnyMap& set_property();
voidconst std::string&const ov::Any& set_property(, );
ov::Anyconst std::string& get_property() const;
static Configconst Config&const bool make_default_multi_threaded(, );
static intconst bool get_default_num_streams();
static intstd::map<std::string, std::string>&const int get_hybrid_num_streams(
,
);
static voidConfig& update_hybrid_custom_threads();
static Configconst Config& reserve_cpu_threads();
};
// direct descendants
struct Config;
Detailed Documentation¶
Defines IStreamsExecutor configuration.
Fields¶
std::string _name
Used by ITT
to name executor threads.
int _streams = 1
Number of streams.
int _threadsPerStream = 0
Number of threads per stream that executes ov_parallel
calls.
ThreadBindingType _threadBindingType = ThreadBindingType::NONE
Thread binding to hardware resource type. No binding by default
int _threadBindingStep = 1
In case of CORES binding offset type thread binded to cores with defined step
int _threadBindingOffset = 0
In case of CORES binding offset type thread binded to cores starting from offset
int _threads = 0
Number of threads distributed between streams. Reserved. Should not be used.
int _big_core_streams = 0
Number of streams in Performance-core(big core)
int _small_core_streams = 0
Number of streams in Efficient-core(small core)
int _threads_per_stream_big = 0
Threads per stream in big cores.
int _threads_per_stream_small = 0
Threads per stream in small cores.
int _small_core_offset = 0
Calculate small core start offset when binding cpu cores.
bool _enable_hyper_thread = true
enable hyper thread
enum ov::threading::IStreamsExecutor::Config::PreferredCoreType _threadPreferredCoreType = PreferredCoreType::ANY
In case of HYBRID_AWARE hints the TBB to affinitize.
Construction¶
Config(, , , , , , , , , )
A constructor with arguments.
Parameters:
name |
The executor name |
streams |
Number of streams. |
threadsPerStream |
Number of threads per stream that executes |
threadBindingType |
|
threadBindingStep |
|
threadBindingOffset |
|
threads |
|
threadPreferBigCores |
Methods¶
voidconst ov::AnyMap& set_property()
Sets configuration.
Parameters:
properties |
map of properties |
voidconst std::string&const ov::Any& set_property(, )
Sets configuration.
Parameters:
key |
property name |
value |
property value |
ov::Anyconst std::string& get_property() const
Return configuration value.
Parameters:
key |
configuration key |
Returns:
configuration value wrapped into ov::Any
static Configconst Config&const bool make_default_multi_threaded(, )
Create appropriate multithreaded configuration filing unconfigured values from initial configuration using hardware properties.
Parameters:
initial |
Inital configuration |
fp_intesive |
additional hint for the the (Hybrid) core-types selection logic whether the executor should be configured for floating point intensive work (as opposite to int8 intensive) |
Returns:
configured values