[newrt] Remove CPU prefix of ConvolutionLayer class (#1891)
author김수진/동작제어Lab(SR)/Engineer/삼성전자 <sjsujin.kim@samsung.com>
Mon, 9 Jul 2018 05:23:42 +0000 (14:23 +0900)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Mon, 9 Jul 2018 05:23:42 +0000 (14:23 +0900)
This commit removes CPU prefix of ConvolutionLayer class

Signed-off-by: sjsujinkim <sjsujin.kim@samsung.com>
runtimes/new_runtime/src/internal/cpu/StageGenerator.cc
runtimes/new_runtime/src/internal/kernels/cpufallback/ConvolutionLayer.cc [moved from runtimes/new_runtime/src/internal/kernels/cpufallback/CPUConvolutionLayer.cc with 97% similarity]
runtimes/new_runtime/src/internal/kernels/cpufallback/ConvolutionLayer.h [moved from runtimes/new_runtime/src/internal/kernels/cpufallback/CPUConvolutionLayer.h with 84% similarity]

index 189a5e6..a6deae5 100644 (file)
@@ -3,7 +3,7 @@
 #include <stdexcept>
 
 #include "internal/Padding.h"
-#include "internal/kernels/cpufallback/CPUConvolutionLayer.h"
+#include "internal/kernels/cpufallback/ConvolutionLayer.h"
 #include "internal/kernels/cpufallback/AvgPoolLayer.h"
 
 #include "logging.h"
@@ -95,8 +95,8 @@ Stage StageGenerator::generate(const ::internal::tflite::op::Conv2D::implicit::N
     auto ker_alloc = tensors->at(::internal::tflite::operand::Index{param.ker_index});
     auto bias_alloc = tensors->at(::internal::tflite::operand::Index{param.bias_index});
 
-    std::unique_ptr<::internal::kernels::cpu::CPUConvolutionLayer> fn{
-        new ::internal::kernels::cpu::CPUConvolutionLayer};
+    std::unique_ptr<::internal::kernels::cpu::ConvolutionLayer> fn{
+        new ::internal::kernels::cpu::ConvolutionLayer};
 
     fn->configure(ifm_alloc->buffer(), param.ifm_shape, ker_alloc->buffer(), param.ker_shape,
                   bias_alloc->buffer(), param.bias_shape, param.padding.left, param.padding.right,
@@ -1,4 +1,4 @@
-#include "CPUConvolutionLayer.h"
+#include "ConvolutionLayer.h"
 
 #include "tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h"
 #include "internal/kernels/cpufallback/OperationUtils.h"
@@ -65,7 +65,7 @@ static char static_scratch_buffer[kStaticBufferSize];
     im2colGuard.reset(im2colData);                                            \
   }
 
-bool CPUConvolutionLayer::convFloat32()
+bool ConvolutionLayer::convFloat32()
 {
   ANDROID_NN_CONV_PARAMETERS(float)
 
@@ -82,7 +82,7 @@ bool CPUConvolutionLayer::convFloat32()
   return true;
 }
 
-bool CPUConvolutionLayer::convQuant8()
+bool ConvolutionLayer::convQuant8()
 {
   /*
     ANDROID_NN_CONV_PARAMETERS(uint8_t)
@@ -133,7 +133,7 @@ bool CPUConvolutionLayer::convQuant8()
   return true;
 }
 
-void CPUConvolutionLayer::configure(
+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,
@@ -158,7 +158,7 @@ void CPUConvolutionLayer::configure(
   _outputShape = convertShape(outputShape);
 }
 
-void CPUConvolutionLayer::run()
+void ConvolutionLayer::run()
 {
   convFloat32();
   /*
@@ -1,5 +1,5 @@
-#ifndef __INTERNAL_KERNELS_CPU_CPUCONVOLUTIONLAYER_H__
-#define __INTERNAL_KERNELS_CPU_CPUCONVOLUTIONLAYER_H__
+#ifndef __INTERNAL_KERNELS_CPU_CONVOLUTIONLAYER_H__
+#define __INTERNAL_KERNELS_CPU_CONVOLUTIONLAYER_H__
 
 #include <NeuralNetworks.h>
 
@@ -17,10 +17,10 @@ namespace kernels
 namespace cpu
 {
 
-class CPUConvolutionLayer : public ::arm_compute::IFunction
+class ConvolutionLayer : public ::arm_compute::IFunction
 {
 public:
-  CPUConvolutionLayer() {}
+  ConvolutionLayer() {}
 
 public:
   bool convFloat32();
@@ -63,4 +63,4 @@ private:
 } // namespace kernels
 } // namespace internal
 
-#endif // __INTERNAL_KERNELS_CPU_CPUCONVOLUTIONLAYER_H__
+#endif // __INTERNAL_KERNELS_CPU_CONVOLUTIONLAYER_H__