1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
7 #include "mkldnn_graph.h"
11 #include <cpp_interfaces/impl/ie_infer_request_internal.hpp>
13 namespace MKLDNNPlugin {
15 class MKLDNNInferRequest : public InferenceEngine::InferRequestInternal {
17 typedef std::shared_ptr<MKLDNNInferRequest> Ptr;
18 explicit MKLDNNInferRequest(InferenceEngine::InputsDataMap networkInputs,
19 InferenceEngine::OutputsDataMap networkOutputs);
21 void InferImpl() override;
23 void GetPerformanceCounts(std::map<std::string, InferenceEngine::InferenceEngineProfileInfo> &perfMap) const override;
26 * @brief Given optional implementation of setting blob to avoid need for it to be implemented by plugin
27 * @param name - a name of input or output blob.
28 * @param data - a reference to input or output blob. The type of Blob must correspond to the network input precision and size.
30 void SetBlob(const char *name, const InferenceEngine::Blob::Ptr &data) override;
33 * @brief Given optional implementation of getting blob to avoid need for it to be implemented by plugin
34 * @param name - a name of input or output blob.
35 * @param data - a reference to input or output blob. The type of Blob must correspond to the network input precision and size.
37 void GetBlob(const char *name, InferenceEngine::Blob::Ptr &data) override;
39 void SetGraph(const MKLDNNGraph::Ptr& graph);
41 void SetBatch(int batch = -1) override;
44 template <typename T> void pushInput(const std::string& inputName, InferenceEngine::Blob::Ptr& inputBlob);
46 void changeDefaultPtr();
47 MKLDNNGraph::Ptr graph;
48 std::map<std::string, void*> externalPtr;
50 } // namespace MKLDNNPlugin