Files
openvino/src/plugins/auto/async_infer_request.cpp
T
Ilya Churaev 0c9abf43a9 Updated copyright headers (#15124)
* Updated copyright headers

* Revert "Fixed linker warnings in docs snippets on Windows (#15119)"

This reverts commit 372699ec49.
2023-01-16 11:02:17 +04:00

37 lines
1.1 KiB
C++

// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
///////////////////////////////////////////////////////////////////////////////////////////////////
#include "async_infer_request.hpp"
namespace MultiDevicePlugin {
AsyncInferRequest::AsyncInferRequest(const Schedule::Ptr& schedule,
const IInferPtr& inferRequest,
const IE::ITaskExecutor::Ptr& callbackExecutor):
AsyncInferRequestThreadSafeDefault(inferRequest, nullptr, callbackExecutor),
_schedule(schedule),
_inferRequest(inferRequest) {
auto pipeline = _schedule->GetPipeline(_inferRequest, &_workerInferRequest);
if (pipeline.size() > 0) {
_pipeline = std::move(pipeline);
}
}
void AsyncInferRequest::Infer_ThreadUnsafe() {
InferUsingAsync();
}
std::map<std::string, IE::InferenceEngineProfileInfo>
AsyncInferRequest::GetPerformanceCounts() const {
CheckState();
auto multiDeviceInfer = std::dynamic_pointer_cast<MultiDeviceInferRequest>(_inferRequest);
return multiDeviceInfer->GetPerformanceCounts();
}
AsyncInferRequest::~AsyncInferRequest() {
StopAndWait();
}
} // namespace MultiDevicePlugin