All mentioned methods are very dependent on a specific hardware and software set-up.
Consider conducting your own experiments with various models and different input/output
sizes. The methods presented here are not universal, they may or may not apply to the
specific pipeline. Please consider all tradeoffs and avoid premature optimizations.
Direct Inference with ``CompiledModel``
#######################################
The ``CompiledModel`` class provides the ``__call__`` method that runs a single synchronous inference using the given model. In addition to a compact code, all future calls to ``CompiledModel.__call__`` will result in less overhead, as the object reuses the already created ``InferRequest``.
"Shared Memory" on outputs is disabled by default in all sequential inference methods (``CompiledModel.__call__`` and ``InferRequest.infer``). It is required to set the flag to ``True`` manually.
* only a part of output data is required. For example, only one specific output is significant in a given pipeline step and all outputs are large, thus, expensive to copy.
* data is not required "now". For example, it can be later extracted inside the pipeline as a part of latency hiding.