1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
8 #include <mkldnn_node.h>
13 namespace MKLDNNPlugin {
15 class MKLDNNReorderNode : public MKLDNNNode {
17 MKLDNNReorderNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng);
18 ~MKLDNNReorderNode() override = default;
20 void getSupportedDescriptors() override;
21 void initSupportedPrimitiveDescriptors() override;
22 void createPrimitive() override;
23 void execute(mkldnn::stream strm) override;
24 bool created() const override;
25 const std::vector<impl_desc_type>& getPrimitivesPriority() override;
27 void setDescs(const InferenceEngine::TensorDesc& input, const InferenceEngine::TensorDesc& output) {
29 this->output = output;
32 void setDynamicBatchLim(int lim) override;
34 bool canBeInPlace() const override {
38 const InferenceEngine::TensorDesc& getInput() { return input; }
39 const InferenceEngine::TensorDesc& getOutput() { return output; }
42 * @brief A pointer to a scales blob
44 InferenceEngine::Blob::Ptr _scales;
47 static Register<MKLDNNReorderNode> reg;
48 InferenceEngine::TensorDesc input;
49 InferenceEngine::TensorDesc output;
51 MKLDNNMemoryPtr dst_blocked;
52 MKLDNNMemoryPtr src_blocked;
54 void createReorderPrimitive(const mkldnn::memory::desc &srcDesc, void* srcPtr, const mkldnn::memory::desc &dstDesc, void* dstPtr);
57 } // namespace MKLDNNPlugin