[neurun] Graph : Introduce operation MaxPool2D (#2220)
author이한종/동작제어Lab(SR)/Engineer/삼성전자 <hanjoung.lee@samsung.com>
Wed, 8 Aug 2018 22:16:29 +0000 (07:16 +0900)
committer박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Wed, 8 Aug 2018 22:16:29 +0000 (07:16 +0900)
Introduce `neurun::graph::operation::MaxPool2D` which is a node in
Graph IR.

Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
runtimes/neurun/src/graph/operation/MaxPool2D.cc [new file with mode: 0644]
runtimes/neurun/src/graph/operation/MaxPool2D.h [new file with mode: 0644]

diff --git a/runtimes/neurun/src/graph/operation/MaxPool2D.cc b/runtimes/neurun/src/graph/operation/MaxPool2D.cc
new file mode 100644 (file)
index 0000000..45bc3e6
--- /dev/null
@@ -0,0 +1,20 @@
+#include "MaxPool2D.h"
+
+namespace neurun
+{
+namespace graph
+{
+namespace operation
+{
+namespace MaxPool2D
+{
+namespace Implicit
+{
+
+// NO IMPLEMENTATION YET
+
+} // namespace Implicit
+} // namespace MaxPool2D
+} // namespace operation
+} // namespace graph
+} // namespace neurun
diff --git a/runtimes/neurun/src/graph/operation/MaxPool2D.h b/runtimes/neurun/src/graph/operation/MaxPool2D.h
new file mode 100644 (file)
index 0000000..0b63c7e
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef __NEURUN_GRAPH_OPERATION_MAXPOOL2D_H__
+#define __NEURUN_GRAPH_OPERATION_MAXPOOL2D_H__
+
+#include <memory>
+
+#include "graph/operation/Node.h"
+#include "internal/op/MaxPool2D.h"
+
+namespace neurun
+{
+namespace graph
+{
+namespace operation
+{
+namespace MaxPool2D
+{
+namespace Implicit
+{
+
+class Node : public graph::operation::Node
+{
+public:
+  Node(std::unique_ptr<::internal::tflite::op::MaxPool2D::implicit::Node> &&op) : _op{std::move(op)}
+  {
+  }
+
+public:
+  virtual operand::IndexSet inputs() const override { return {_op->param().ifm_index}; }
+  virtual operand::IndexSet outputs() const override { return {_op->param().ofm_index}; }
+  virtual const ::internal::tflite::op::Node *op() const override { return _op.get(); }
+
+private:
+  std::unique_ptr<::internal::tflite::op::MaxPool2D::implicit::Node> _op;
+};
+
+} // namespace Implicit
+} // namespace MaxPool2D
+} // namespace operation
+} // namespace graph
+} // namespace neurun
+
+#endif // __NEURUN_GRAPH_OPERATION_MAXPOOL2D_H__