From b6df9490f205ba4f3ea6457def19f67f67c09b78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 29 Aug 2018 13:30:11 +0900 Subject: [PATCH] [enco] Record ANN input/output opreands (#1227) This commit extends ann::Module class with input and output methods which records the input and output operands of android NN model. Signed-off-by: Jonghyun Park --- contrib/enco/core/src/ANN/IR/InputList.h | 15 +++++++++++++++ contrib/enco/core/src/ANN/IR/Module.h | 10 ++++++++++ contrib/enco/core/src/ANN/IR/OutputList.h | 15 +++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 contrib/enco/core/src/ANN/IR/InputList.h create mode 100644 contrib/enco/core/src/ANN/IR/OutputList.h diff --git a/contrib/enco/core/src/ANN/IR/InputList.h b/contrib/enco/core/src/ANN/IR/InputList.h new file mode 100644 index 0000000..23de60a --- /dev/null +++ b/contrib/enco/core/src/ANN/IR/InputList.h @@ -0,0 +1,15 @@ +#ifndef __ANN_IR_INPUT_LIST_H__ +#define __ANN_IR_INPUT_LIST_H__ + +#include "ANN/IR/OperandID.h" + +#include + +namespace ann +{ + +using InputList = std::vector; + +} // namespace ann + +#endif // __ANN_IR_INPUT_LIST_H__ diff --git a/contrib/enco/core/src/ANN/IR/Module.h b/contrib/enco/core/src/ANN/IR/Module.h index 181dad6..12472cb 100644 --- a/contrib/enco/core/src/ANN/IR/Module.h +++ b/contrib/enco/core/src/ANN/IR/Module.h @@ -4,6 +4,8 @@ #include "ANN/IR/WeightInventory.h" #include "ANN/IR/OperandInventory.h" #include "ANN/IR/OperationInventory.h" +#include "ANN/IR/InputList.h" +#include "ANN/IR/OutputList.h" namespace ann { @@ -23,10 +25,18 @@ public: OperationInventory *operation(void) { return &_operation; } const OperationInventory *operation(void) const { return &_operation; } + InputList *input(void) { return &_input; } + const InputList *input(void) const { return &_input; } + + OutputList *output(void) { return &_output; } + const OutputList *output(void) const { return &_output; } + private: WeightInventory _weight; OperandInventory _operand; OperationInventory _operation; + InputList _input; + OutputList _output; }; } // namespace ann diff --git a/contrib/enco/core/src/ANN/IR/OutputList.h b/contrib/enco/core/src/ANN/IR/OutputList.h new file mode 100644 index 0000000..a8881d0 --- /dev/null +++ b/contrib/enco/core/src/ANN/IR/OutputList.h @@ -0,0 +1,15 @@ +#ifndef __ANN_IR_OUTPUT_LIST_H__ +#define __ANN_IR_OUTPUT_LIST_H__ + +#include "ANN/IR/OperandID.h" + +#include + +namespace ann +{ + +using OutputList = std::vector; + +} // namespace ann + +#endif // __ANN_IR_OUTPUT_LIST_H__ -- 2.7.4