[neurun] Move internal/operand to graph/operand (#2520)
author오형석/동작제어Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 30 Aug 2018 07:02:30 +0000 (16:02 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 30 Aug 2018 07:02:30 +0000 (16:02 +0900)
Move internal/operand to graph/operand
Change namespace neurun::internal::operand to neurun::graph::operand
Remove internal/operand

Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
25 files changed:
runtimes/neurun/src/backend/cpu/InitializerGenerator.cc
runtimes/neurun/src/frontend/model.cc
runtimes/neurun/src/graph/Graph.cc
runtimes/neurun/src/graph/Graph.h
runtimes/neurun/src/graph/operand/Data.h [moved from runtimes/neurun/src/internal/operand/Data.h with 84% similarity]
runtimes/neurun/src/graph/operand/DataType.h [moved from runtimes/neurun/src/internal/operand/DataType.h with 57% similarity]
runtimes/neurun/src/graph/operand/IndexSet.h
runtimes/neurun/src/graph/operand/Object.cc [moved from runtimes/neurun/src/internal/operand/Object.cc with 96% similarity]
runtimes/neurun/src/graph/operand/Object.h [moved from runtimes/neurun/src/internal/operand/Object.h with 91% similarity]
runtimes/neurun/src/graph/operand/Set.cc
runtimes/neurun/src/graph/operand/Set.h
runtimes/neurun/src/graph/operand/Shape.cc [moved from runtimes/neurun/src/internal/operand/Shape.cc with 93% similarity]
runtimes/neurun/src/graph/operand/Shape.h [moved from runtimes/neurun/src/internal/operand/Shape.h with 78% similarity]
runtimes/neurun/src/graph/operand/TypeInfo.cc [moved from runtimes/neurun/src/internal/operand/TypeInfo.cc with 67% similarity]
runtimes/neurun/src/graph/operand/TypeInfo.h [moved from runtimes/neurun/src/internal/operand/TypeInfo.h with 72% similarity]
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/OperationUtils.cc
runtimes/neurun/src/kernel/cpu/OperationUtils.h
runtimes/neurun/test/graph/operand/Set.cc
runtimes/neurun/test/graph/operation/Insert.cc
runtimes/neurun/test/graph/operation/SetIO.cc
runtimes/neurun/test/graph/verifier/Verifier.cc

index 3208655..05d2cc1 100644 (file)
@@ -55,7 +55,7 @@ Initializer InitializerGenerator::generateWeight(const graph::operation::FullyCo
 
   switch (weight_type)
   {
-    case ::neurun::internal::operand::DataType::TENSOR_FLOAT32:
+    case ::neurun::graph::operand::DataType::TENSOR_FLOAT32:
     {
       return [num_output, ifm_shape, weight_base, weight_size](::arm_compute::ITensor &tensor) {
         const ::nnfw::util::kernel::Shape ker_shape{num_output, ifm_shape.C, ifm_shape.H,
@@ -82,7 +82,7 @@ Initializer InitializerGenerator::generateWeight(const graph::operation::FullyCo
                };
       };
     }
-    case ::neurun::internal::operand::DataType::TENSOR_QUANT8_ASYMM:
+    case ::neurun::graph::operand::DataType::TENSOR_QUANT8_ASYMM:
     {
       return [num_output, ifm_shape, weight_base, weight_size](::arm_compute::ITensor &tensor) {
         const ::nnfw::util::kernel::Shape ker_shape{num_output, ifm_shape.C, ifm_shape.H,
@@ -148,7 +148,7 @@ Initializer InitializerGenerator::generateBias(const graph::operation::FullyConn
 
   switch (bias_type)
   {
-    case ::neurun::internal::operand::DataType::TENSOR_FLOAT32:
+    case ::neurun::graph::operand::DataType::TENSOR_FLOAT32:
     {
       return [bias_base, bias_size](::arm_compute::ITensor &tensor) {
         for (uint32_t n = 0; n < bias_size; ++n)
@@ -164,7 +164,7 @@ Initializer InitializerGenerator::generateBias(const graph::operation::FullyConn
         }
       };
     }
-    case ::neurun::internal::operand::DataType::TENSOR_QUANT8_ASYMM:
+    case ::neurun::graph::operand::DataType::TENSOR_QUANT8_ASYMM:
     {
       return [bias_base, bias_size](::arm_compute::ITensor &tensor) {
         for (uint32_t n = 0; n < bias_size; ++n)
index 588955e..04237dd 100644 (file)
@@ -78,9 +78,9 @@ int ANeuralNetworksModel_addOperand(ANeuralNetworksModel *model,
     return ANEURALNETWORKS_BAD_DATA;
   }
 
-  ::neurun::internal::operand::Shape shape(type->dimensionCount);
-  ::neurun::internal::operand::TypeInfo typeInfo((OperandCode)(type->type), type->scale,
-                                                 type->zeroPoint);
+  ::neurun::graph::operand::Shape shape(type->dimensionCount);
+  ::neurun::graph::operand::TypeInfo typeInfo((OperandCode)(type->type), type->scale,
+                                              type->zeroPoint);
 
   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 ::neurun::internal::operand::CachedData;
+  using ::neurun::graph::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 ::neurun::internal::operand::ExternalData;
+  using ::neurun::graph::operand::ExternalData;
 
   model->deref().setOperandValue(
       ind, nnfw::make_unique<ExternalData>(
index f0c4084..b0bc637 100644 (file)
@@ -14,8 +14,7 @@ namespace neurun
 namespace graph
 {
 
-operand::Index Graph::addOperand(const ::neurun::internal::operand::Shape &shape,
-                                 const ::neurun::internal::operand::TypeInfo &type)
+operand::Index Graph::addOperand(const operand::Shape &shape, const operand::TypeInfo &type)
 {
   assert(_phase == Phase::BUILDING);
   return _operands.append(shape, type);
@@ -71,8 +70,7 @@ operation::Index Graph::insertOperation(const operand::Index &prev_operand_index
   return _operations.append(std::move(node));
 }
 
-void Graph::setOperandValue(const operand::Index &ind,
-                            std::unique_ptr<::neurun::internal::operand::Data> &&data)
+void Graph::setOperandValue(const operand::Index &ind, std::unique_ptr<operand::Data> &&data)
 {
   assert(_phase == Phase::BUILDING);
   assert(_operands.exist(ind));
index cbf4e2b..82355df 100644 (file)
@@ -63,14 +63,12 @@ public:
 
   // Graph Building
 public:
-  operand::Index addOperand(const ::neurun::internal::operand::Shape &shape,
-                            const ::neurun::internal::operand::TypeInfo &type);
+  operand::Index addOperand(const operand::Shape &shape, const operand::TypeInfo &type);
   operation::Index addOperation(std::unique_ptr<operation::Node> &&node);
   operation::Index insertOperation(const operand::Index &prev_operand_index,
                                    const operation::Index &next_operation_index,
                                    std::unique_ptr<operation::Node> &&node);
-  void setOperandValue(const operand::Index &ind,
-                       std::unique_ptr<::neurun::internal::operand::Data> &&data);
+  void setOperandValue(const operand::Index &ind, std::unique_ptr<operand::Data> &&data);
   void addInput(const operand::Index &ind);
   void addOutput(const operand::Index &ind);
   void finishBuilding(void);
similarity index 84%
rename from runtimes/neurun/src/internal/operand/Data.h
rename to runtimes/neurun/src/graph/operand/Data.h
index b5465bc..94059de 100644 (file)
@@ -1,11 +1,11 @@
-#ifndef __NEURUN_INTERNAL_OPERAND_DATA_H__
-#define __NEURUN_INTERNAL_OPERAND_DATA_H__
+#ifndef __NEURUN_GRAPH_OPERAND_DATA_H__
+#define __NEURUN_GRAPH_OPERAND_DATA_H__
 
 #include <algorithm>
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -56,7 +56,7 @@ private:
 };
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
 
-#endif // __NEURUN_INTERNAL_OPERAND_DATA_H__
+#endif // __NEURUN_GRAPH_OPERAND_DATA_H__
@@ -1,9 +1,9 @@
-#ifndef __NEURUN_INTERNAL_OPERAND_DATATYPE_H__
-#define __NEURUN_INTERNAL_OPERAND_DATATYPE_H__
+#ifndef __NEURUN_GRAPH_OPERAND_DATATYPE_H__
+#define __NEURUN_GRAPH_OPERAND_DATATYPE_H__
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -21,7 +21,7 @@ enum class DataType
 };
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
 
-#endif // __NEURUN_INTERNAL_OPERAND_DATA_H__
+#endif // __NEURUN_GRAPH_OPERAND_DATATYPE_H__
index 6080cf0..077e70b 100644 (file)
@@ -4,7 +4,7 @@
 #include <initializer_list>
 #include <vector>
 
-#include "graph/operand/Index.h"
+#include "Index.h"
 
 namespace neurun
 {
similarity index 96%
rename from runtimes/neurun/src/internal/operand/Object.cc
rename to runtimes/neurun/src/graph/operand/Object.cc
index bbb9e7c..cc054a7 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -58,5 +58,5 @@ bool Object::setUsage(const OperandUsage usage)
 }
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
similarity index 91%
rename from runtimes/neurun/src/internal/operand/Object.h
rename to runtimes/neurun/src/graph/operand/Object.h
index eaaa987..fc5bd01 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __NEURUN_INTERNAL_OPERAND_OBJECT_H__
-#define __NEURUN_INTERNAL_OPERAND_OBJECT_H__
+#ifndef __NEURUN_GRAPH_OPERAND_OBJECT_H__
+#define __NEURUN_GRAPH_OPERAND_OBJECT_H__
 
 #include <cassert>
 #include <cstdint>
@@ -12,7 +12,7 @@
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -76,7 +76,7 @@ private:
 };
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
 
-#endif // __NEURUN_INTERNAL_OPERAND_OBJECT_H__
+#endif // __NEURUN_GRAPH_OPERAND_OBJECT_H__
index 61b4953..0e107b9 100644 (file)
@@ -16,18 +16,18 @@ const Index Set::generateIndex()
   return Index{_index_count++};
 }
 
-Index Set::append(const internal::Shape &shape, const internal::TypeInfo &type)
+Index Set::append(const Shape &shape, const TypeInfo &type)
 {
   auto index = generateIndex();
 
-  _objects[index.asInt()] = nnfw::make_unique<internal::Object>(shape, type);
+  _objects[index.asInt()] = nnfw::make_unique<Object>(shape, type);
 
   return index;
 }
 
-const internal::Object &Set::at(const Index &index) const { return *(_objects.at(index.asInt())); }
+const Object &Set::at(const Index &index) const { return *(_objects.at(index.asInt())); }
 
-internal::Object &Set::at(const Index &index) { return *(_objects.at(index.asInt())); }
+Object &Set::at(const Index &index) { return *(_objects.at(index.asInt())); }
 
 bool Set::exist(const Index &index) const { return index.asInt() < _objects.size(); }
 
index 0a6ff76..f618a17 100644 (file)
@@ -4,7 +4,7 @@
 #include <memory>
 #include <map>
 
-#include "internal/operand/Object.h"
+#include "Object.h"
 #include "Index.h"
 
 namespace neurun
@@ -14,29 +14,24 @@ namespace graph
 namespace operand
 {
 
-namespace
-{
-namespace internal = ::neurun::internal::operand;
-}
-
 class Set
 {
 public:
   Set() : _index_count(0) {}
 
 public:
-  Index append(const internal::Shape &, const internal::TypeInfo &);
+  Index append(const Shape &, const TypeInfo &);
 
 public:
-  const internal::Object &at(const Index &) const;
-  internal::Object &at(const Index &);
+  const Object &at(const Index &) const;
+  Object &at(const Index &);
   bool exist(const Index &) const;
 
 private:
   const Index generateIndex();
 
 private:
-  std::map<uint32_t, std::unique_ptr<internal::Object>> _objects;
+  std::map<uint32_t, std::unique_ptr<Object>> _objects;
   uint32_t _index_count;
 };
 
similarity index 93%
rename from runtimes/neurun/src/internal/operand/Shape.cc
rename to runtimes/neurun/src/graph/operand/Shape.cc
index 17e204f..381bce1 100644 (file)
@@ -1,10 +1,10 @@
 #include <cassert>
 
-#include "internal/operand/Shape.h"
+#include "Shape.h"
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -53,5 +53,5 @@ nnfw::util::kernel::Shape Shape::asKernel(void) const
 }
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
similarity index 78%
rename from runtimes/neurun/src/internal/operand/Shape.h
rename to runtimes/neurun/src/graph/operand/Shape.h
index 910836f..f2e89e1 100644 (file)
@@ -1,6 +1,6 @@
 
-#ifndef __NEURUN_INTERNAL_OPERAND_SHAPE_H__
-#define __NEURUN_INTERNAL_OPERAND_SHAPE_H__
+#ifndef __NEURUN_GRAPH_OPERAND_SHAPE_H__
+#define __NEURUN_GRAPH_OPERAND_SHAPE_H__
 
 #include <vector>
 #include <cstdint>
@@ -10,7 +10,7 @@
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -38,7 +38,7 @@ private:
 };
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
 
-#endif // __NEURUN_INTERNAL_OPERAND_SHAPE_H__
+#endif // __NEURUN_GRAPH_OPERAND_SHAPE_H__
@@ -2,18 +2,18 @@
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
 
 DataType TypeInfo::typeFromOperandCode(OperandCode type)
 {
-  // Now neurun::internal::operand::DataType share same enum value with OperandCode
+  // Now neurun::graph::operand::DataType share same enum value with OperandCode
   // in NeuralNetworks.h.
   return static_cast<DataType>(static_cast<uint32_t>(type));
 }
 
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
@@ -1,5 +1,5 @@
-#ifndef __NEURUN_INTERNAL_OPERAND_TYPEINFO_H__
-#define __NEURUN_INTERNAL_OPERAND_TYPEINFO_H__
+#ifndef __NEURUN_GRAPH_OPERAND_TYPEINFO_H__
+#define __NEURUN_GRAPH_OPERAND_TYPEINFO_H__
 
 #include <cstdint>
 
@@ -9,7 +9,7 @@
 
 namespace neurun
 {
-namespace internal
+namespace graph
 {
 namespace operand
 {
@@ -29,7 +29,7 @@ public:
   int32_t offset() const { return _offset; }
 
 private:
-  // Now neurun::internal::operand::DataType share same enum value with OperandCode
+  // Now neurun::graph::operand::DataType share same enum value with OperandCode
   // in NeuralNetworks.h.
   // If we don't share same value, we must fix this mapping function.
   DataType typeFromOperandCode(OperandCode type);
@@ -40,7 +40,7 @@ private:
   int32_t _offset;
 };
 } // namespace operand
-} // namespace internal
+} // namespace graph
 } // namespace neurun
 
-#endif // __NEURUN_INTERNAL_OPERAND_TYPEINFO_H__
+#endif // __NEURUN_GRAPH_OPERAND_TYPEINFO_H__
index 3ec1e87..fa1d775 100644 (file)
@@ -78,7 +78,7 @@ bool TensorConvertFromCommonLayer::convert()
 
 void TensorConvertFromCommonLayer::configure(::internal::common::Tensor *inputTensor,
                                              ::arm_compute::ICLTensor *outputTensor,
-                                             const ::neurun::internal::operand::Shape &tensorShape)
+                                             const ::neurun::graph::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index 7537891..bd031a1 100644 (file)
@@ -47,7 +47,7 @@ public:
   bool convert();
 
   void configure(::internal::common::Tensor *inputTensor, ::arm_compute::ICLTensor *outputTensor,
-                 const ::neurun::internal::operand::Shape &tensorShape);
+                 const ::neurun::graph::operand::Shape &tensorShape);
 
   void run();
 
@@ -55,7 +55,7 @@ private:
   ::internal::common::Tensor *_inputTensor;
   ::arm_compute::ICLTensor *_outputTensor;
 
-  ::neurun::internal::operand::Shape _tensorShape{1};
+  ::neurun::graph::operand::Shape _tensorShape{1};
 };
 
 } // namespace acl_cl
index 89d8322..985524b 100644 (file)
@@ -78,7 +78,7 @@ bool TensorConvertToCommonLayer::convert()
 
 void TensorConvertToCommonLayer::configure(::arm_compute::ICLTensor *inputTensor,
                                            ::internal::common::Tensor *outputTensor,
-                                           const ::neurun::internal::operand::Shape &tensorShape)
+                                           const ::neurun::graph::operand::Shape &tensorShape)
 {
   _inputTensor = inputTensor;
   _outputTensor = outputTensor;
index 5544ad3..576f1ee 100644 (file)
@@ -47,7 +47,7 @@ public:
   bool convert();
 
   void configure(::arm_compute::ICLTensor *inputTensor, ::internal::common::Tensor *outputTensor,
-                 const ::neurun::internal::operand::Shape &tensorShape);
+                 const ::neurun::graph::operand::Shape &tensorShape);
 
   void run();
 
@@ -55,7 +55,7 @@ private:
   ::arm_compute::ICLTensor *_inputTensor;
   ::internal::common::Tensor *_outputTensor;
 
-  ::neurun::internal::operand::Shape _tensorShape{1};
+  ::neurun::graph::operand::Shape _tensorShape{1};
 };
 
 } // namespace acl_cl
index 3f35abb..3b93003 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 getShape(const ::neurun::internal::operand::Object &o)
+Shape getShape(const ::neurun::graph::operand::Object &o)
 {
   Shape shape;
 
index 412920e..74d474c 100644 (file)
@@ -8,7 +8,7 @@
 #include <vector>
 
 #include "tensorflow/contrib/lite/kernels/internal/types.h"
-#include "internal/operand/Object.h"
+#include "graph/operand/Object.h"
 
 namespace neurun
 {
@@ -85,7 +85,7 @@ void CalculateActivationRangeUint8(int32_t activation, const Shape &outputShape,
 
 int32_t CalculateInputRadius(int input_integer_bits, int input_left_shift);
 
-Shape getShape(const ::neurun::internal::operand::Object &o);
+Shape getShape(const ::neurun::graph::operand::Object &o);
 
 uint32_t sizeOfData(OperandType type, const std::vector<uint32_t> &dimensions);
 
index e263277..1eaf445 100644 (file)
@@ -6,18 +6,18 @@ TEST(graph_operand_Set, set_test)
 {
   neurun::graph::operand::Set set;
 
-  ::neurun::internal::operand::Shape shape0{3};
+  ::neurun::graph::operand::Shape shape0{3};
   shape0.dim(0) = 1;
   shape0.dim(1) = 2;
   shape0.dim(2) = 3;
 
-  ::neurun::internal::operand::Shape shape1{4};
+  ::neurun::graph::operand::Shape shape1{4};
   shape1.dim(0) = 10;
   shape1.dim(1) = 20;
   shape1.dim(2) = 30;
   shape1.dim(3) = 40;
 
-  ::neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  ::neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
 
   set.append(shape0, type);
   set.append(shape1, type);
index 60f5cb6..fba7555 100644 (file)
@@ -47,8 +47,8 @@ TEST(graph_operation_manipulation, operation_insertion)
   neurun::graph::Graph graph;
   neurun::graph::verifier::DAGChecker verifier;
 
-  neurun::internal::operand::Shape shape{1u};
-  neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  neurun::graph::operand::Shape shape{1u};
+  neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
   shape.dim(0) = 3;
 
   // Model Input/Output
@@ -102,8 +102,8 @@ TEST(graph_operation_manipulation, operation_insertion_multi_input)
   neurun::graph::Graph graph;
   neurun::graph::verifier::DAGChecker verifier;
 
-  neurun::internal::operand::Shape shape{1u};
-  neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  neurun::graph::operand::Shape shape{1u};
+  neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
   shape.dim(0) = 3;
 
   // Model Input/Output
index e7b1a76..1579b01 100644 (file)
@@ -17,8 +17,8 @@ TEST(graph_operation_setIO, operation_setIO_conv)
 {
   neurun::graph::Graph graph;
 
-  neurun::internal::operand::Shape shape{1u};
-  neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  neurun::graph::operand::Shape shape{1u};
+  neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
   shape.dim(0) = 3;
 
   // Add Conv
@@ -42,8 +42,8 @@ TEST(graph_operation_setIO, operation_setIO_concat)
 {
   neurun::graph::Graph graph;
 
-  neurun::internal::operand::Shape shape{1u};
-  neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  neurun::graph::operand::Shape shape{1u};
+  neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
   shape.dim(0) = 3;
 
   // Add Concat
index 220ed71..08fa495 100644 (file)
@@ -23,8 +23,8 @@ TEST(Verifier, dag_checker)
   neurun::graph::Graph graph;
   neurun::graph::verifier::DAGChecker verifier;
 
-  ::neurun::internal::operand::Shape shape{1u};
-  ::neurun::internal::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
+  ::neurun::graph::operand::Shape shape{1u};
+  ::neurun::graph::operand::TypeInfo type{ANEURALNETWORKS_TENSOR_INT32, 0, 0};
   shape.dim(0) = 3;
 
   auto operand1 = graph.addOperand(shape, type);