diff --git a/src/plugins/auto/async_infer_request.cpp b/src/plugins/auto/async_infer_request.cpp index 8f45f81a0dd..0eab8046cb4 100644 --- a/src/plugins/auto/async_infer_request.cpp +++ b/src/plugins/auto/async_infer_request.cpp @@ -12,6 +12,7 @@ #include #include #include +#include "utils/log_util.hpp" namespace MultiDevicePlugin { using namespace InferenceEngine; @@ -71,6 +72,9 @@ MultiDeviceAsyncInferRequest::MultiDeviceAsyncInferRequest( /*TaskExecutor*/ _multiDeviceExecutableNetwork, /*task*/ [this] { _workerInferRequest = MultiDeviceExecutableNetwork::_thisWorkerInferRequest; _inferRequest->SetBlobsToAnotherRequest(_workerInferRequest->_inferRequest); + INFO_RUN([this]() { + _workerInferRequest->_startTimes.push_back(std::move(std::chrono::steady_clock::now())); + }); }}, // final task in the pipeline: { /*TaskExecutor*/std::make_shared(this), /*task*/ [this] { @@ -79,7 +83,9 @@ MultiDeviceAsyncInferRequest::MultiDeviceAsyncInferRequest( } if (_needPerfCounters) _perfMap = _workerInferRequest->_inferRequest->GetPerformanceCounts(); - _workerInferRequest->_inferCount++; + INFO_RUN([this]() { + _workerInferRequest->_endTimes.push_back(std::move(std::chrono::steady_clock::now())); + }); }} }; } diff --git a/src/plugins/auto/async_infer_request.hpp b/src/plugins/auto/async_infer_request.hpp index c72c95164ed..9e0b756882b 100644 --- a/src/plugins/auto/async_infer_request.hpp +++ b/src/plugins/auto/async_infer_request.hpp @@ -14,6 +14,7 @@ #include #include "infer_request.hpp" #include "executable_network.hpp" +#include "utils/log_util.hpp" #ifdef MULTIUNITTEST #define MOCKTESTMACRO virtual diff --git a/src/plugins/auto/executable_network.cpp b/src/plugins/auto/executable_network.cpp index eb480060bf3..3c87c518eca 100644 --- a/src/plugins/auto/executable_network.cpp +++ b/src/plugins/auto/executable_network.cpp @@ -84,6 +84,7 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const DeviceMapGetCore() == nullptr) { IE_THROW() << "Please, work with " << _multiPlugin->GetName() << " device via InferencEngine::Core object"; } @@ -228,16 +231,16 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const std::string& deviceName.c_str()); auto supported_config_keys = _core->GetMetric(deviceName, METRIC_KEY(SUPPORTED_CONFIG_KEYS)).as>(); - // there is log mutex in LOG_DEBUG, add _configMutex just want to print them all together - // toDo maybe neet to implement LOG_RUN(task, LOG_LEVEL) to run some debug code. - std::lock_guard lock(_confMutex); - for (const auto& cfg : supported_config_keys) { - try { - LOG_DEBUG("[AUTOPLUGIN]:device:%s, GetConfig:%s=%s", deviceName.c_str(), - cfg.c_str(), contextPtr->executableNetwork->GetConfig(cfg).as().c_str()); - } catch (...) { + DEBUG_RUN([this, &contextPtr, &deviceName, &supported_config_keys]{ + std::lock_guard lock(_confMutex); + for (const auto& cfg : supported_config_keys) { + try { + LOG_DEBUG("[AUTOPLUGIN]:device:%s, GetConfig:%s=%s", deviceName.c_str(), + cfg.c_str(), contextPtr->executableNetwork->GetConfig(cfg).as().c_str()); + } catch (...) { + } } - } + }); } contextPtr->promise.set_value(); // the first load network process finished @@ -284,12 +287,35 @@ MultiDeviceExecutableNetwork::MultiDeviceExecutableNetwork(const std::string& // second, check the idle queue if all requests are in place size_t destroynum = 0; std::pair worker; + std::list