Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / mkldnn_plugin / nodes / mkldnn_gemm_node.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <ie_common.h>
8 #include <mkldnn_node.h>
9 #include <string>
10 #include <vector>
11
12 namespace MKLDNNPlugin {
13
14 class MKLDNNGemmNode : public MKLDNNNode {
15 public:
16     MKLDNNGemmNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng);
17     ~MKLDNNGemmNode() override = default;
18
19     void getSupportedDescriptors() override;
20     void initSupportedPrimitiveDescriptors() override;
21     void createPrimitive() override;
22     void execute(mkldnn::stream strm) override;
23     bool created() const override;
24     int getMaxBatch() override;
25
26 private:
27     static Register<MKLDNNGemmNode> reg;
28     float alpha;
29     float beta;
30     bool transposeA;
31     bool transposeB;
32
33     int xAxis;
34     int yAxis;
35
36     bool isThreeInputs;
37
38     std::vector<int> aOffsets;
39     std::vector<int> bOffsets;
40     std::vector<int> cOffsets;
41 };
42
43 }  // namespace MKLDNNPlugin
44