interface InferenceEngine::IStreamsExecutor¶
Overview¶
Interface for Streams Task Executor. This executor groups worker threads into so-called streams
. More…
#include <ie_istreams_executor.hpp>
template IStreamsExecutor:
public InferenceEngine::ITaskExecutor,
public ov::threading::IStreamsExecutor
{
// typedefs
typedef std::shared_ptr<IStreamsExecutor> Ptr;
// structs
struct Config;
// methods
virtual int GetStreamId() = 0;
virtual int GetNumaNodeId() = 0;
virtual int GetSocketId() = 0;
virtual voidTask Execute() = 0;
virtual int get_stream_id();
virtual int get_numa_node_id();
virtual int get_socket_id();
virtual voidTask execute();
};
// direct descendants
class CPUStreamsExecutor;
class TBBStreamsExecutor;
Inherited Members¶
public:
// typedefs
typedef std::shared_ptr<ITaskExecutor> Ptr;
// enums
enum ThreadBindingType;
// structs
struct Config;
// methods
virtual voidTask run() = 0;
virtual voidconst std::vector<Task>& run_and_wait();
virtual voidconst std::vector<Task>& runAndWait();
virtual int get_stream_id() = 0;
virtual int get_numa_node_id() = 0;
virtual int get_socket_id() = 0;
virtual voidTask execute() = 0;
Detailed Documentation¶
Interface for Streams Task Executor. This executor groups worker threads into so-called streams
.
The executor executes all parallel tasks using threads from one stream. With proper pinning settings it should reduce cache misses for memory bound workloads.
On NUMA hosts GetNumaNodeId() method can be used to define the NUMA node of current stream
Typedefs¶
typedef std::shared_ptr<IStreamsExecutor> Ptr
A shared pointer to IStreamsExecutor interface
Methods¶
virtual int GetStreamId() = 0
Return the index of current stream.
Returns:
An index of current stream. Or throw exceptions if called not from stream thread
virtual int GetNumaNodeId() = 0
Return the id of current NUMA Node.
Returns:
ID
of current NUMA Node, or throws exceptions if called not from stream thread
virtual int GetSocketId() = 0
Return the id of current socket.
Returns:
ID
of current socket, or throws exceptions if called not from stream thread
virtual voidTask Execute() = 0
Execute the task in the current thread using streams executor configuration and constraints.
Parameters:
task |
A task to start |
virtual int get_stream_id()
Return the index of current stream.
Returns:
An index of current stream. Or throw exceptions if called not from stream thread
virtual int get_numa_node_id()
Return the id of current NUMA Node Return 0 when current stream cross some NUMA Nodes.
Returns:
ID
of current NUMA Node, or throws exceptions if called not from stream thread
virtual int get_socket_id()
Return the id of current socket Return 0 when current stream cross some sockets.
Returns:
ID
of current socket, or throws exceptions if called not from stream thread
virtual voidTask execute()
Execute the task in the current thread using streams executor configuration and constraints.
Parameters:
task |
A task to start |