COMPMID-477 - Optimized CLNormalizationLayer
CLPixelWiseMultiplication has been removed within the function

Change-Id: Ibe7edd7921d5cef6ff68fdeeca89771129a8eaea
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/84459
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
diff --git a/src/runtime/CL/functions/CLNormalizationLayer.cpp b/src/runtime/CL/functions/CLNormalizationLayer.cpp
index 69cef33..f4bd494 100644
--- a/src/runtime/CL/functions/CLNormalizationLayer.cpp
+++ b/src/runtime/CL/functions/CLNormalizationLayer.cpp
@@ -33,29 +33,26 @@
 using namespace arm_compute;
 
 CLNormalizationLayer::CLNormalizationLayer()
-    : _squared_input(), _norm_kernel(), _multiply_kernel(), _border_handler()
+    : _norm_kernel(), _border_handler()
 {
 }
 
-void CLNormalizationLayer::configure(const ICLTensor *input, ICLTensor *output, NormalizationLayerInfo norm_info)
+void CLNormalizationLayer::configure(ICLTensor *input, ICLTensor *output, NormalizationLayerInfo norm_info)
 {
     ARM_COMPUTE_ERROR_ON(input == nullptr);
 
-    TensorInfo tensor_info(input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position());
-    _squared_input.allocator()->init(tensor_info);
+    // Configure normalization kernel
+    _norm_kernel.configure(input, output, norm_info);
 
-    _norm_kernel.configure(input, &_squared_input, output, norm_info);
-    _multiply_kernel.configure(input, input, &_squared_input, 1.0f, ConvertPolicy::SATURATE, RoundingPolicy::TO_NEAREST_EVEN);
     // Fill the border by 3 elements since we need vload4 in the IN_MAP normalization kernel
-    _border_handler.configure(&_squared_input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue(0));
-
-    // Allocate intermediate buffers
-    _squared_input.allocator()->allocate();
+    _border_handler.configure(input, _norm_kernel.border_size(), BorderMode::CONSTANT, PixelValue(0));
 }
 
 void CLNormalizationLayer::run()
 {
-    CLScheduler::get().enqueue(_multiply_kernel, false);
+    // Run border handler
     CLScheduler::get().enqueue(_border_handler, false);
-    CLScheduler::get().enqueue(_norm_kernel, false);
+
+    // Run normalization kernel
+    CLScheduler::get().enqueue(_norm_kernel);
 }