[neurun] Change namespace for internal operand (#2368)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Mon, 20 Aug 2018 10:22:24 +0000 (19:22 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Mon, 20 Aug 2018 10:22:24 +0000 (19:22 +0900)
Change namespace: internal::tflite::operand -> neurun::internal::operand

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
38 files changed:
runtimes/neurun/src/backend/acl_cl/StageGenerator.cc
runtimes/neurun/src/backend/cpu/StageGenerator.cc
runtimes/neurun/src/frontend/model.cc
runtimes/neurun/src/graph/Graph.cc
runtimes/neurun/src/graph/Graph.h
runtimes/neurun/src/graph/operand/Set.cc
runtimes/neurun/src/graph/operand/Set.h
runtimes/neurun/src/internal/operand/Data.h
runtimes/neurun/src/internal/operand/Object.cc
runtimes/neurun/src/internal/operand/Object.h
runtimes/neurun/src/internal/operand/Shape.cc
runtimes/neurun/src/internal/operand/Shape.h
runtimes/neurun/src/kernel/acl_cl/TensorConvertFromCommonLayer.cc
runtimes/neurun/src/kernel/acl_cl/TensorConvertFromCommonLayer.h
runtimes/neurun/src/kernel/acl_cl/TensorConvertToCommonLayer.cc
runtimes/neurun/src/kernel/acl_cl/TensorConvertToCommonLayer.h
runtimes/neurun/src/kernel/cpu/AvgPoolLayer.cc
runtimes/neurun/src/kernel/cpu/AvgPoolLayer.h
runtimes/neurun/src/kernel/cpu/ConcatLayer.cc
runtimes/neurun/src/kernel/cpu/ConcatLayer.h
runtimes/neurun/src/kernel/cpu/ConvolutionLayer.cc
runtimes/neurun/src/kernel/cpu/ConvolutionLayer.h
runtimes/neurun/src/kernel/cpu/FullyConnectedLayer.cc
runtimes/neurun/src/kernel/cpu/FullyConnectedLayer.h
runtimes/neurun/src/kernel/cpu/MaxPoolLayer.cc
runtimes/neurun/src/kernel/cpu/MaxPoolLayer.h
runtimes/neurun/src/kernel/cpu/OperationUtils.cc
runtimes/neurun/src/kernel/cpu/OperationUtils.h
runtimes/neurun/src/kernel/cpu/ReshapeLayer.cc
runtimes/neurun/src/kernel/cpu/ReshapeLayer.h
runtimes/neurun/src/kernel/cpu/SoftMaxLayer.cc
runtimes/neurun/src/kernel/cpu/SoftMaxLayer.h
runtimes/neurun/src/kernel/cpu/TensorConvertFromCommonLayer.cc
runtimes/neurun/src/kernel/cpu/TensorConvertFromCommonLayer.h
runtimes/neurun/src/kernel/cpu/TensorConvertToCommonLayer.cc
runtimes/neurun/src/kernel/cpu/TensorConvertToCommonLayer.h
runtimes/neurun/test/graph/operand/Set.cc
runtimes/neurun/test/graph/verifier/Verifier.cc

index 568a7d0..60d71b5 100644 (file)
@@ -531,7 +531,7 @@ Stage StageGenerator::generate(
   {
     int ifm_index;
 
-    internal::tflite::operand::Shape shape{1};
+    ::neurun::internal::operand::Shape shape{1};
   };
 
   Param param;
@@ -569,7 +569,7 @@ Stage StageGenerator::generate(const ::internal::tflite::op::TensorConvert::AclT
   {
     int ofm_index;
 
-    internal::tflite::operand::Shape shape{1};
+    ::neurun::internal::operand::Shape shape{1};
   };
 
   Param param;
index 5f1450a..e71dec1 100644 (file)
@@ -68,10 +68,10 @@ Stage StageGenerator::generate(const ::internal::tflite::op::Conv2D::implicit::N
     int ker_index;
     int bias_index;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
-    ::internal::tflite::operand::Shape ker_shape{1};
-    ::internal::tflite::operand::Shape bias_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape ker_shape{1};
+    ::neurun::internal::operand::Shape bias_shape{1};
 
     ::internal::Padding padding;
     ::internal::Stride stride;
@@ -154,8 +154,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::MaxPool2D::implicit
     uint32_t kw;
     uint32_t kh;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
 
     ::internal::Padding padding;
     ::internal::Stride stride;
@@ -252,8 +252,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::AvgPool2D::implicit
     uint32_t kw;
     uint32_t kh;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
 
     ::internal::Padding padding;
     ::internal::Stride stride;
@@ -328,8 +328,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::Concat::Node &node)
 
     int32_t axis;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    std::vector<::internal::tflite::operand::Shape> ifm_shapes;
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    std::vector<::neurun::internal::operand::Shape> ifm_shapes;
   };
 
   Param param;
@@ -385,10 +385,10 @@ Stage StageGenerator::generate(const ::internal::tflite::op::FullyConnected::Nod
     int weight_index;
     int bias_index;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
-    ::internal::tflite::operand::Shape weight_shape{1};
-    ::internal::tflite::operand::Shape bias_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape weight_shape{1};
+    ::neurun::internal::operand::Shape bias_shape{1};
 
     FuseCode activation;
   };
@@ -436,8 +436,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::Reshape::Node &node
     int output_index;
     int input_index;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
   };
 
   Param param;
@@ -476,8 +476,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::Softmax::Node &node
     int output_index;
     int input_index;
 
-    ::internal::tflite::operand::Shape ofm_shape{1};
-    ::internal::tflite::operand::Shape ifm_shape{1};
+    ::neurun::internal::operand::Shape ofm_shape{1};
+    ::neurun::internal::operand::Shape ifm_shape{1};
 
     float scale;
   };
@@ -517,7 +517,7 @@ Stage StageGenerator::generate(
   {
     int ifm_index;
 
-    internal::tflite::operand::Shape shape{1};
+    ::neurun::internal::operand::Shape shape{1};
   };
 
   Param param;
@@ -555,7 +555,7 @@ Stage StageGenerator::generate(const ::internal::tflite::op::TensorConvert::CpuT
   {
     int ofm_index;
 
-    internal::tflite::operand::Shape shape{1};
+    ::neurun::internal::operand::Shape shape{1};
   };
 
   Param param;
index 1e00b5f..5828024 100644 (file)
@@ -78,7 +78,7 @@ int ANeuralNetworksModel_addOperand(ANeuralNetworksModel *model,
     return ANEURALNETWORKS_BAD_DATA;
   }
 
-  internal::tflite::operand::Shape shape(type->dimensionCount);
+  ::neurun::internal::operand::Shape shape(type->dimensionCount);
 
   for (uint32_t axis = 0; axis < type->dimensionCount; ++axis)
   {
@@ -126,7 +126,7 @@ int ANeuralNetworksModel_setOperandValue(ANeuralNetworksModel *model, int32_t in
     return ANEURALNETWORKS_BAD_DATA;
   }
 
-  using internal::tflite::operand::CachedData;
+  using ::neurun::internal::operand::CachedData;
 
   model->deref().setOperandValue(
       ind, nnfw::make_unique<CachedData>(reinterpret_cast<const uint8_t *>(buffer), length));
@@ -165,7 +165,7 @@ int ANeuralNetworksModel_setOperandValueFromMemory(ANeuralNetworksModel *model,
     return ANEURALNETWORKS_BAD_DATA;
   }
 
-  using internal::tflite::operand::ExternalData;
+  using ::neurun::internal::operand::ExternalData;
 
   model->deref().setOperandValue(
       ind, nnfw::make_unique<ExternalData>(
index 9d161e8..577b271 100644 (file)
@@ -13,7 +13,7 @@ namespace neurun
 namespace graph
 {
 
-operand::Index Graph::addOperand(const ::internal::tflite::operand::Shape &shape)
+operand::Index Graph::addOperand(const ::neurun::internal::operand::Shape &shape)
 {
   assert(_phase == Phase::BUILDING);
   return _operands.append(shape);
@@ -26,7 +26,7 @@ operation::Index Graph::addOperation(std::unique_ptr<operation::Node> &&node)
 }
 
 void Graph::setOperandValue(const operand::Index &ind,
-                            std::unique_ptr<::internal::tflite::operand::Data> &&data)
+                            std::unique_ptr<::neurun::internal::operand::Data> &&data)
 {
   assert(_phase == Phase::BUILDING);
   assert(_operands.exist(ind));
index 85db7df..42321f8 100644 (file)
@@ -37,10 +37,10 @@ public:
 
   // Graph Building
 public:
-  operand::Index addOperand(const ::internal::tflite::operand::Shape &shape);
+  operand::Index addOperand(const ::neurun::internal::operand::Shape &shape);
   operation::Index addOperation(std::unique_ptr<operation::Node> &&node);
   void setOperandValue(const operand::Index &ind,
-                       std::unique_ptr<::internal::tflite::operand::Data> &&data);
+                       std::unique_ptr<::neurun::internal::operand::Data> &&data);
   void addInput(const operand::Index &ind);
   void addOutput(const operand::Index &ind);
   void finishBuilding(void);
index 8215241..5793c6b 100644 (file)
@@ -7,21 +7,21 @@ namespace graph
 namespace operand
 {
 
-Index Set::append(const ::internal::tflite::operand::Shape &shape)
+Index Set::append(const ::neurun::internal::operand::Shape &shape)
 {
   uint32_t index = _objects.size();
 
-  _objects.emplace_back(new ::internal::tflite::operand::Object{shape});
+  _objects.emplace_back(new ::neurun::internal::operand::Object{shape});
 
   return Index{index};
 }
 
-const ::internal::tflite::operand::Object &Set::at(const Index &index) const
+const ::neurun::internal::operand::Object &Set::at(const Index &index) const
 {
   return *(_objects.at(index.asInt()));
 }
 
-::internal::tflite::operand::Object &Set::at(const Index &index)
+::neurun::internal::operand::Object &Set::at(const Index &index)
 {
   return *(_objects.at(index.asInt()));
 }
index 0d24f8a..ba0ab5c 100644 (file)
@@ -20,15 +20,15 @@ public:
   Set() = default;
 
 public:
-  Index append(const ::internal::tflite::operand::Shape &);
+  Index append(const ::neurun::internal::operand::Shape &);
 
 public:
-  const ::internal::tflite::operand::Object &at(const Index &) const;
-  ::internal::tflite::operand::Object &at(const Index &);
+  const ::neurun::internal::operand::Object &at(const Index &) const;
+  ::neurun::internal::operand::Object &at(const Index &);
   bool exist(const Index &) const;
 
 private:
-  std::vector<std::unique_ptr<::internal::tflite::operand::Object>> _objects;
+  std::vector<std::unique_ptr<::neurun::internal::operand::Object>> _objects;
 };
 
 } // namespace operand
index 67ef2c9..b5465bc 100644 (file)
@@ -3,9 +3,9 @@
 
 #include <algorithm>
 
-namespace internal
+namespace neurun
 {
-namespace tflite
+namespace internal
 {
 namespace operand
 {
@@ -56,7 +56,7 @@ private:
 };
 
 } // namespace operand
-} // namespace tflite
 } // namespace internal
+} // namespace neurun
 
 #endif // __NEURUN_INTERNAL_OPERAND_DATA_H__
index 460e91c..b61524d 100644 (file)
@@ -1,8 +1,8 @@
 #include "Object.h"
 
-namespace internal
+namespace neurun
 {
-namespace tflite
+namespace internal
 {
 namespace operand
 {
@@ -58,5 +58,5 @@ bool Object::setUsage(const OperandUsage usage)
 }
 
 } // namespace operand
-} // namespace tflite
 } // namespace internal
+} // namespace neurun
index 3464527..93e76a5 100644 (file)
@@ -9,9 +9,9 @@
 #include "Shape.h"
 #include "Data.h"
 
-namespace internal
+namespace neurun
 {
-namespace tflite
+namespace internal
 {
 namespace operand
 {
@@ -72,7 +72,7 @@ private:
 };
 
 } // namespace operand
-} // namespace tflite
 } // namespace internal
+} // namespace neurun
 
 #endif // __NEURUN_INTERNAL_OPERAND_OBJECT_H__
index 71fb60f..17e204f 100644 (file)
@@ -2,9 +2,9 @@
 
 #include "internal/operand/Shape.h"
 
-namespace internal
+namespace neurun
 {
-namespace tflite
+namespace internal
 {
 namespace operand
 {
@@ -53,5 +53,5 @@ nnfw::util::kernel::Shape Shape::asKernel(void) const
 }
 
 } // namespace operand
-} // namespace tflite
 } // namespace internal
+} // namespace neurun
index 3c97312..c2a3b83 100644 (file)
@@ -8,9 +8,9 @@
 #include "util/feature/Shape.h"
 #include "util/kernel/Shape.h"
 
-namespace internal
+namespace neurun
 {
-namespace tflite
+namespace internal
 {
 namespace operand
 {
@@ -51,7 +51,7 @@ private:
 };
 
 } // namespace operand
-} // namespace tflite
 } // namespace internal
+} // namespace neurun
 
 #endif // __NEURUN_INTERNAL_OPERAND_SHAPE_H__
index 0615526..260c8a1 100644 (file)
@@ -72,7 +72,7 @@ bool TensorConvertFromCommonLayer::convert()
 
 void TensorConvertFromCommonLayer::configure(::internal::common::Tensor *inputTensor,
                                              ::arm_compute::ICLTensor *outputTensor,
-                                             const ::internal::tflite::operand::Shape &tensorShape)
+                                             const ::neurun::internal::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index c193015..989f69b 100644 (file)
@@ -41,7 +41,7 @@ public:
   bool convert();
 
   void configure(::internal::common::Tensor *inputTensor, ::arm_compute::ICLTensor *outputTensor,
-                 const ::internal::tflite::operand::Shape &tensorShape);
+                 const ::neurun::internal::operand::Shape &tensorShape);
 
   void run();
 
@@ -49,7 +49,7 @@ private:
   ::internal::common::Tensor *_inputTensor;
   ::arm_compute::ICLTensor *_outputTensor;
 
-  ::internal::tflite::operand::Shape _tensorShape{1};
+  ::neurun::internal::operand::Shape _tensorShape{1};
 };
 
 } // namespace acl_cl
index 9f7ae08..7ec0690 100644 (file)
@@ -72,7 +72,7 @@ bool TensorConvertToCommonLayer::convert()
 
 void TensorConvertToCommonLayer::configure(::arm_compute::ICLTensor *inputTensor,
                                            ::internal::common::Tensor *outputTensor,
-                                           const ::internal::tflite::operand::Shape &tensorShape)
+                                           const ::neurun::internal::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index fca1681..6b63ee9 100644 (file)
@@ -41,7 +41,7 @@ public:
   bool convert();
 
   void configure(::arm_compute::ICLTensor *inputTensor, ::internal::common::Tensor *outputTensor,
-                 const ::internal::tflite::operand::Shape &tensorShape);
+                 const ::neurun::internal::operand::Shape &tensorShape);
 
   void run();
 
@@ -49,7 +49,7 @@ private:
   ::arm_compute::ICLTensor *_inputTensor;
   ::internal::common::Tensor *_outputTensor;
 
-  ::internal::tflite::operand::Shape _tensorShape{1};
+  ::neurun::internal::operand::Shape _tensorShape{1};
 };
 
 } // namespace acl_cl
index f65411d..daa2ff7 100644 (file)
@@ -66,13 +66,14 @@ bool AvgPoolLayer::averagePoolQuant8()
   return true;
 }
 
-void AvgPoolLayer::configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
+void AvgPoolLayer::configure(uint8_t *inputData,
+                             const ::neurun::internal::operand::Shape inputShape,
                              const uint32_t paddingLeft, const uint32_t paddingRight,
                              const uint32_t paddingTop, const uint32_t paddingBottom,
                              const uint32_t strideWidth, const uint32_t strideHeight,
                              const uint32_t kernelWidth, const uint32_t kernelHeight,
                              const FuseCode activation, uint8_t *outputData,
-                             const internal::tflite::operand::Shape outputShape)
+                             const ::neurun::internal::operand::Shape outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index 2bdd430..67423b3 100644 (file)
@@ -27,12 +27,12 @@ public:
 
   bool averagePoolQuant8();
 
-  void configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape,
                  const uint32_t paddingLeft, const uint32_t paddingRight, const uint32_t paddingTop,
                  const uint32_t paddingBottom, const uint32_t strideWidth,
                  const uint32_t strideHeight, const uint32_t kernelWidth,
                  const uint32_t kernelHeight, const FuseCode activation, uint8_t *outputData,
-                 const internal::tflite::operand::Shape outputShape);
+                 const ::neurun::internal::operand::Shape outputShape);
 
   void run();
 
index 03a1e4e..29b1cb8 100644 (file)
@@ -67,9 +67,9 @@ bool ConcatLayer::concatenationQuant8()
 }
 
 void ConcatLayer::configure(const std::vector<const uint8_t *> &inputDataPtrs,
-                            const std::vector<internal::tflite::operand::Shape> &inputShapes,
+                            const std::vector<::neurun::internal::operand::Shape> &inputShapes,
                             int32_t axis, uint8_t *outputData,
-                            const internal::tflite::operand::Shape outputShape)
+                            const ::neurun::internal::operand::Shape outputShape)
 {
   _inputDataPtrs = inputDataPtrs;
 
index febae6a..8b97218 100644 (file)
@@ -45,8 +45,8 @@ public:
   bool concatenationQuant8();
 
   void configure(const std::vector<const uint8_t *> &inputDataPtrs,
-                 const std::vector<internal::tflite::operand::Shape> &inputShapes, int32_t axis,
-                 uint8_t *outputData, const internal::tflite::operand::Shape outputShape);
+                 const std::vector<::neurun::internal::operand::Shape> &inputShapes, int32_t axis,
+                 uint8_t *outputData, const ::neurun::internal::operand::Shape outputShape);
 
   void run();
 
index 0150682..60d2cd1 100644 (file)
@@ -146,12 +146,12 @@ bool ConvolutionLayer::convQuant8()
 }
 
 void ConvolutionLayer::configure(
-    uint8_t *inputData, const internal::tflite::operand::Shape inputShape, uint8_t *kernelData,
-    const internal::tflite::operand::Shape kernelShape, uint8_t *biasData,
-    const internal::tflite::operand::Shape biasShape, const uint32_t paddingLeft,
+    uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape, uint8_t *kernelData,
+    const ::neurun::internal::operand::Shape kernelShape, uint8_t *biasData,
+    const ::neurun::internal::operand::Shape biasShape, const uint32_t paddingLeft,
     const uint32_t paddingRight, const uint32_t paddingTop, const uint32_t paddingBottom,
     const uint32_t strideWidth, const uint32_t strideHeight, const FuseCode activation,
-    uint8_t *outputData, const internal::tflite::operand::Shape outputShape)
+    uint8_t *outputData, const ::neurun::internal::operand::Shape outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index 33f3cd7..525f3eb 100644 (file)
@@ -27,13 +27,13 @@ public:
 
   bool convQuant8();
 
-  void configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
-                 uint8_t *kernelData, const internal::tflite::operand::Shape kernelShape,
-                 uint8_t *biasData, const internal::tflite::operand::Shape biasShape,
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape,
+                 uint8_t *kernelData, const ::neurun::internal::operand::Shape kernelShape,
+                 uint8_t *biasData, const ::neurun::internal::operand::Shape biasShape,
                  const uint32_t paddingLeft, const uint32_t paddingRight, const uint32_t paddingTop,
                  const uint32_t paddingBottom, const uint32_t strideW, const uint32_t strideH,
                  const FuseCode activation, uint8_t *outputData,
-                 const internal::tflite::operand::Shape outputShape);
+                 const ::neurun::internal::operand::Shape outputShape);
 
   void run();
 
index 602f1ce..6a4987e 100644 (file)
@@ -97,10 +97,10 @@ bool FullyConnectedLayer::fullyConnectedQuant8()
 }
 
 void FullyConnectedLayer::configure(
-    uint8_t *inputData, const internal::tflite::operand::Shape inputShape, uint8_t *weightsData,
-    const internal::tflite::operand::Shape weightsShape, uint8_t *biasData,
-    const internal::tflite::operand::Shape biasShape, FuseCode activation, uint8_t *outputData,
-    const internal::tflite::operand::Shape outputShape)
+    uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape, uint8_t *weightsData,
+    const ::neurun::internal::operand::Shape weightsShape, uint8_t *biasData,
+    const ::neurun::internal::operand::Shape biasShape, FuseCode activation, uint8_t *outputData,
+    const ::neurun::internal::operand::Shape outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index c25c2a1..7a21680 100644 (file)
@@ -27,11 +27,11 @@ public:
 
   bool fullyConnectedQuant8();
 
-  void configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
-                 uint8_t *weightsData, const internal::tflite::operand::Shape weightsShape,
-                 uint8_t *biasData, const internal::tflite::operand::Shape biasShape,
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape,
+                 uint8_t *weightsData, const ::neurun::internal::operand::Shape weightsShape,
+                 uint8_t *biasData, const ::neurun::internal::operand::Shape biasShape,
                  FuseCode activation, uint8_t *outputData,
-                 const internal::tflite::operand::Shape outputShape);
+                 const ::neurun::internal::operand::Shape outputShape);
 
   void run();
 
index c914d91..f45c068 100644 (file)
@@ -49,13 +49,14 @@ bool MaxPoolLayer::maxPoolQuant8()
   return true;
 }
 
-void MaxPoolLayer::configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
+void MaxPoolLayer::configure(uint8_t *inputData,
+                             const ::neurun::internal::operand::Shape inputShape,
                              const uint32_t paddingLeft, const uint32_t paddingRight,
                              const uint32_t paddingTop, const uint32_t paddingBottom,
                              const uint32_t strideWidth, const uint32_t strideHeight,
                              const uint32_t kernelWidth, const uint32_t kernelHeight,
                              const FuseCode activation, uint8_t *outputData,
-                             const internal::tflite::operand::Shape outputShape)
+                             const ::neurun::internal::operand::Shape outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index b48f068..405073c 100644 (file)
@@ -27,12 +27,12 @@ public:
 
   bool maxPoolQuant8();
 
-  void configure(uint8_t *inputData, const internal::tflite::operand::Shape inputShape,
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape inputShape,
                  const uint32_t paddingLeft, const uint32_t paddingRight, const uint32_t paddingTop,
                  const uint32_t paddingBottom, const uint32_t strideWidth,
                  const uint32_t strideHeight, const uint32_t kernelWidth,
                  const uint32_t kernelHeight, const FuseCode activation, uint8_t *outputData,
-                 const internal::tflite::operand::Shape outputShape);
+                 const ::neurun::internal::operand::Shape outputShape);
 
   void run();
 
index 99968ef..bd56311 100644 (file)
@@ -168,7 +168,7 @@ int32_t CalculateInputRadius(int input_integer_bits, int input_left_shift)
   return static_cast<int32_t>(std::floor(max_input_rescaled));
 }
 
-Shape convertShape(const ::internal::tflite::operand::Shape &o)
+Shape convertShape(const ::neurun::internal::operand::Shape &o)
 {
   Shape shape;
 
index 8ba0df6..d13a065 100644 (file)
@@ -85,7 +85,7 @@ void CalculateActivationRangeUint8(int32_t activation, const Shape &outputShape,
 
 int32_t CalculateInputRadius(int input_integer_bits, int input_left_shift);
 
-Shape convertShape(const ::internal::tflite::operand::Shape &o);
+Shape convertShape(const ::neurun::internal::operand::Shape &o);
 
 uint32_t sizeOfData(OperandType type, const std::vector<uint32_t> &dimensions);
 
index a83c254..895d3f3 100644 (file)
@@ -35,9 +35,10 @@ bool ReshapeLayer::reshapeGeneric()
   return true;
 }
 
-void ReshapeLayer::configure(uint8_t *inputData, const internal::tflite::operand::Shape &inputShape,
+void ReshapeLayer::configure(uint8_t *inputData,
+                             const ::neurun::internal::operand::Shape &inputShape,
                              uint8_t *outputData,
-                             const internal::tflite::operand::Shape &outputShape)
+                             const ::neurun::internal::operand::Shape &outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index 5a93a0f..3610386 100644 (file)
@@ -25,8 +25,8 @@ public:
 public:
   bool reshapeGeneric();
 
-  void configure(uint8_t *inputData, const internal::tflite::operand::Shape &inputShape,
-                 uint8_t *outputData, const internal::tflite::operand::Shape &outputShape);
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape &inputShape,
+                 uint8_t *outputData, const ::neurun::internal::operand::Shape &outputShape);
 
   void run();
 
index a23fed8..eeb86b3 100644 (file)
@@ -77,9 +77,9 @@ bool SoftMaxLayer::softmaxQuant8()
 }
 
 void SoftMaxLayer::configure(uint8_t *inputData,
-                             const ::internal::tflite::operand::Shape &inputShape, const float beta,
+                             const ::neurun::internal::operand::Shape &inputShape, const float beta,
                              uint8_t *outputData,
-                             const ::internal::tflite::operand::Shape &outputShape)
+                             const ::neurun::internal::operand::Shape &outputShape)
 {
   _inputData = inputData;
   _inputShape = convertShape(inputShape);
index f232576..9c395ca 100644 (file)
@@ -27,9 +27,9 @@ public:
 
   bool softmaxQuant8();
 
-  void configure(uint8_t *inputData, const ::internal::tflite::operand::Shape &inputShape,
+  void configure(uint8_t *inputData, const ::neurun::internal::operand::Shape &inputShape,
                  const float beta, uint8_t *outputData,
-                 const ::internal::tflite::operand::Shape &outputShape);
+                 const ::neurun::internal::operand::Shape &outputShape);
 
   void run();
 
index 69978e7..8d3f3b7 100644 (file)
@@ -68,7 +68,7 @@ bool TensorConvertFromCommonLayer::convert()
 
 void TensorConvertFromCommonLayer::configure(::internal::common::Tensor *inputTensor,
                                              ::internal::cpu::Tensor *outputTensor,
-                                             const ::internal::tflite::operand::Shape &tensorShape)
+                                             const ::neurun::internal::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index 2fad500..1ee9ba3 100644 (file)
@@ -41,7 +41,7 @@ public:
   bool convert();
 
   void configure(::internal::common::Tensor *inputTensor, ::internal::cpu::Tensor *outputTensor,
-                 const ::internal::tflite::operand::Shape &tensorShape);
+                 const ::neurun::internal::operand::Shape &tensorShape);
 
   void run();
 
@@ -49,7 +49,7 @@ private:
   ::internal::common::Tensor *_inputTensor;
   ::internal::cpu::Tensor *_outputTensor;
 
-  ::internal::tflite::operand::Shape _tensorShape{1};
+  ::neurun::internal::operand::Shape _tensorShape{1};
 };
 
 } // namespace cpu
index 7d0161d..3dd6293 100644 (file)
@@ -68,7 +68,7 @@ bool TensorConvertToCommonLayer::convert()
 
 void TensorConvertToCommonLayer::configure(::internal::cpu::Tensor *inputTensor,
                                            ::internal::common::Tensor *outputTensor,
-                                           const ::internal::tflite::operand::Shape &tensorShape)
+                                           const ::neurun::internal::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index 10edac5..49ae50d 100644 (file)
@@ -41,7 +41,7 @@ public:
   bool convert();
 
   void configure(::internal::cpu::Tensor *inputTensor, ::internal::common::Tensor *outputTensor,
-                 const ::internal::tflite::operand::Shape &tensorShape);
+                 const ::neurun::internal::operand::Shape &tensorShape);
 
   void run();
 
@@ -49,7 +49,7 @@ private:
   ::internal::cpu::Tensor *_inputTensor;
   ::internal::common::Tensor *_outputTensor;
 
-  ::internal::tflite::operand::Shape _tensorShape{1};
+  ::neurun::internal::operand::Shape _tensorShape{1};
 };
 
 } // namespace cpu
index 0b6c378..cd679c7 100644 (file)
@@ -6,12 +6,12 @@ TEST(graph_operand_Set, set_test)
 {
   neurun::graph::operand::Set set;
 
-  internal::tflite::operand::Shape shape0{3};
+  ::neurun::internal::operand::Shape shape0{3};
   shape0.dim(0) = 1;
   shape0.dim(1) = 2;
   shape0.dim(2) = 3;
 
-  internal::tflite::operand::Shape shape1{4};
+  ::neurun::internal::operand::Shape shape1{4};
   shape1.dim(0) = 10;
   shape1.dim(1) = 20;
   shape1.dim(2) = 30;
index 2030668..a24d1dc 100644 (file)
@@ -29,7 +29,7 @@ TEST(Verifier, dag_checker)
   neurun::graph::Graph graph;
   neurun::graph::verifier::DAGChecker verifier;
 
-  internal::tflite::operand::Shape shape{1u};
+  ::neurun::internal::operand::Shape shape{1u};
   shape.dim(0) = 3;
 
   auto operand1 = graph.addOperand(shape);