Rename [Cl|Cpu]GemmConvolution to [Cl|Gpu]GemmConv2d

Renaming the gemm-based convolution operators to accomodate for new
operators with higher convolution dimensonality

Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Id2f2cf11404221f0e87baa0e5d08ad5d63eaf78e
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6113
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/runtime/cpu/operators/CpuConv2d.cpp b/src/runtime/cpu/operators/CpuConv2d.cpp
index 809663a..cff9238 100644
--- a/src/runtime/cpu/operators/CpuConv2d.cpp
+++ b/src/runtime/cpu/operators/CpuConv2d.cpp
@@ -26,7 +26,7 @@
 #include "arm_compute/runtime/NEON/functions/NEFFTConvolutionLayer.h"
 #include "src/runtime/cpu/operators/CpuDirectConv2d.h"
 #include "src/runtime/cpu/operators/CpuGemm.h"
-#include "src/runtime/cpu/operators/CpuGemmConvolution.h"
+#include "src/runtime/cpu/operators/CpuGemmConv2d.h"
 #include "src/runtime/cpu/operators/CpuGemmDirectConv2d.h"
 #include "src/runtime/cpu/operators/CpuWinogradConv2d.h"
 
@@ -62,7 +62,7 @@
         }
         case ConvolutionMethod::GEMM:
         {
-            auto f = std::make_unique<CpuGemmConvolution>();
+            auto f = std::make_unique<CpuGemmConv2d>();
             f->configure(input, weights, biases, output, conv_info, weights_info, dilation, act_info, enable_fast_math);
             _function = std::move(f);
             break;
@@ -101,7 +101,7 @@
             ARM_COMPUTE_RETURN_ON_ERROR(CpuWinogradConv2d::validate(input, weights, biases, output, conv_info, act_info, enable_fast_math));
             break;
         case ConvolutionMethod::GEMM:
-            ARM_COMPUTE_RETURN_ON_ERROR(CpuGemmConvolution::validate(input, weights, biases, output, conv_info, weights_info, dilation, act_info, enable_fast_math));
+            ARM_COMPUTE_RETURN_ON_ERROR(CpuGemmConv2d::validate(input, weights, biases, output, conv_info, weights_info, dilation, act_info, enable_fast_math));
             break;
         case ConvolutionMethod::GEMM_CONV2D:
             ARM_COMPUTE_RETURN_ON_ERROR(CpuGemmDirectConv2d::validate(input, weights, biases, output, info));
diff --git a/src/runtime/cpu/operators/CpuGemmConvolution.cpp b/src/runtime/cpu/operators/CpuGemmConv2d.cpp
similarity index 91%
rename from src/runtime/cpu/operators/CpuGemmConvolution.cpp
rename to src/runtime/cpu/operators/CpuGemmConv2d.cpp
index 81d656c..a81dd8a 100644
--- a/src/runtime/cpu/operators/CpuGemmConvolution.cpp
+++ b/src/runtime/cpu/operators/CpuGemmConv2d.cpp
@@ -21,7 +21,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#include "src/runtime/cpu/operators/CpuGemmConvolution.h"
+#include "src/runtime/cpu/operators/CpuGemmConv2d.h"
 
 #include "arm_compute/core/Size2D.h"
 #include "arm_compute/core/TensorInfo.h"
@@ -51,15 +51,15 @@
 {
 namespace cpu
 {
-CpuGemmConvolution::CpuGemmConvolution()
+CpuGemmConv2d::CpuGemmConv2d()
     : _weights_reshape_kernel(nullptr), _im2col_kernel(), _mm_gemm(), _mm_gemmlowp(), _col2im_kernel(), _reshape_kernel(), _im2col_output(), _weights_reshaped(), _gemm_output(), _gemm_output_3d(),
       _data_layout(DataLayout::NCHW), _skip_im2col(false), _skip_col2im(false), _is_quantized(false), _is_prepared(false), _aux_mem(AuxTensorIdx::Count)
 {
 }
-CpuGemmConvolution::~CpuGemmConvolution() = default;
+CpuGemmConv2d::~CpuGemmConv2d() = default;
 
-void CpuGemmConvolution::configure_mm(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const ActivationLayerInfo &act_info,
-                                      bool enable_fast_math, int gemm_3d_depth)
+void CpuGemmConv2d::configure_mm(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const ActivationLayerInfo &act_info,
+                                 bool enable_fast_math, int gemm_3d_depth)
 {
     ARM_COMPUTE_ERROR_ON_NULLPTR(src, weights);
     ARM_COMPUTE_ERROR_THROW_ON(validate_mm(src, weights, biases, dst, act_info, enable_fast_math, gemm_3d_depth, _skip_im2col));
@@ -137,8 +137,8 @@
     }
 }
 
-Status CpuGemmConvolution::validate_mm(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst,
-                                       const ActivationLayerInfo &act_info, bool enable_fast_math, int gemm_3d_depth, bool skip_im2col)
+Status CpuGemmConv2d::validate_mm(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst,
+                                  const ActivationLayerInfo &act_info, bool enable_fast_math, int gemm_3d_depth, bool skip_im2col)
 {
     const DataType data_type             = src->data_type();
     const bool     is_quantized          = is_data_type_quantized_asymmetric(data_type);
@@ -197,7 +197,7 @@
     }
 }
 
-Status CpuGemmConvolution::validate_gemm3d(const ITensorInfo *input_info, const ITensorInfo *weights_info, const ActivationLayerInfo &act_info, int gemm_3d_depth, bool skip_im2col)
+Status CpuGemmConv2d::validate_gemm3d(const ITensorInfo *input_info, const ITensorInfo *weights_info, const ActivationLayerInfo &act_info, int gemm_3d_depth, bool skip_im2col)
 {
     const DataType     data_type = input_info->data_type();
     const unsigned int mult_y    = skip_im2col ? 1U : gemm_3d_depth;
@@ -211,21 +211,21 @@
     return validate_mm(&dummy_input_info, &dummy_weights_info, nullptr, &dummy_output_info, act_info, false, gemm_3d_depth, skip_im2col);
 }
 
-void CpuGemmConvolution::configure(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const PadStrideInfo &conv_info, const WeightsInfo &weights_info,
-                                   const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups)
+void CpuGemmConv2d::configure(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const PadStrideInfo &conv_info, const WeightsInfo &weights_info,
+                              const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups)
 {
     ARM_COMPUTE_ERROR_ON_NULLPTR(src, weights, dst);
     ARM_COMPUTE_UNUSED(num_groups, weights_info);
-    ARM_COMPUTE_ERROR_THROW_ON(CpuGemmConvolution::validate(src,
-                                                            weights,
-                                                            biases,
-                                                            dst,
-                                                            conv_info,
-                                                            weights_info,
-                                                            dilation,
-                                                            act_info,
-                                                            enable_fast_math,
-                                                            num_groups));
+    ARM_COMPUTE_ERROR_THROW_ON(CpuGemmConv2d::validate(src,
+                                                       weights,
+                                                       biases,
+                                                       dst,
+                                                       conv_info,
+                                                       weights_info,
+                                                       dilation,
+                                                       act_info,
+                                                       enable_fast_math,
+                                                       num_groups));
 
     const DataType   data_type   = src->data_type();
     const DataLayout data_layout = src->data_layout();
@@ -353,8 +353,8 @@
     _aux_mem[GemmOutput]      = MemoryInfo(offset_int_vec(GemmOutput), MemoryLifetime::Temporary, _gemm_output.total_size());
 }
 
-Status CpuGemmConvolution::validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const PadStrideInfo &conv_info,
-                                    const WeightsInfo &weights_info, const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups)
+Status CpuGemmConv2d::validate(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const PadStrideInfo &conv_info,
+                               const WeightsInfo &weights_info, const Size2D &dilation, const ActivationLayerInfo &act_info, bool enable_fast_math, unsigned int num_groups)
 {
     ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(src, weights, dst);
     ARM_COMPUTE_RETURN_ERROR_ON_MSG(weights_info.are_reshaped(), "Weights already reshaped are not supported!");
@@ -489,7 +489,7 @@
     return Status{};
 }
 
-void CpuGemmConvolution::run(ITensorPack &tensors)
+void CpuGemmConv2d::run(ITensorPack &tensors)
 {
     prepare(tensors);
 
@@ -581,7 +581,7 @@
     }
 }
 
-void CpuGemmConvolution::prepare(ITensorPack &tensors)
+void CpuGemmConv2d::prepare(ITensorPack &tensors)
 {
     if(!_is_prepared)
     {
@@ -604,7 +604,7 @@
         _is_prepared = true;
     }
 }
-experimental::MemoryRequirements CpuGemmConvolution::workspace() const
+experimental::MemoryRequirements CpuGemmConv2d::workspace() const
 {
     return _aux_mem;
 }
diff --git a/src/runtime/cpu/operators/CpuGemmConvolution.h b/src/runtime/cpu/operators/CpuGemmConv2d.h
similarity index 95%
rename from src/runtime/cpu/operators/CpuGemmConvolution.h
rename to src/runtime/cpu/operators/CpuGemmConv2d.h
index 7755bbe..5292565 100644
--- a/src/runtime/cpu/operators/CpuGemmConvolution.h
+++ b/src/runtime/cpu/operators/CpuGemmConv2d.h
@@ -21,8 +21,8 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#ifndef ARM_COMPUTE_CPU_GEMMCONVOLUTION_H
-#define ARM_COMPUTE_CPU_GEMMCONVOLUTION_H
+#ifndef ARM_COMPUTE_CPU_GEMM_CONV2D_H
+#define ARM_COMPUTE_CPU_GEMM_CONV2D_H
 
 #include "arm_compute/core/TensorInfo.h"
 #include "arm_compute/core/Types.h"
@@ -55,21 +55,21 @@
  * -# @ref kernels::CpuWeightsReshapeKernel
  *
  */
-class CpuGemmConvolution : public ICpuOperator
+class CpuGemmConv2d : public ICpuOperator
 {
 public:
     /** Constructor */
-    CpuGemmConvolution();
+    CpuGemmConv2d();
     /** Prevent instances of this class from being copied (As this class contains pointers) */
-    CpuGemmConvolution(const CpuGemmConvolution &) = delete;
+    CpuGemmConv2d(const CpuGemmConv2d &) = delete;
     /** Prevent instances of this class from being moved (As this class contains non movable objects) */
-    CpuGemmConvolution(CpuGemmConvolution &&) = delete;
+    CpuGemmConv2d(CpuGemmConv2d &&) = delete;
     /** Prevent instances of this class from being copied (As this class contains pointers) */
-    CpuGemmConvolution &operator=(const CpuGemmConvolution &) = delete;
+    CpuGemmConv2d &operator=(const CpuGemmConv2d &) = delete;
     /** Prevent instances of this class from being moved (As this class contains non movable objects) */
-    CpuGemmConvolution &operator=(CpuGemmConvolution &&) = delete;
+    CpuGemmConv2d &operator=(CpuGemmConv2d &&) = delete;
     /** Destructor */
-    ~CpuGemmConvolution();
+    ~CpuGemmConv2d();
     /** Set the input and output tensors.
      *
      * Valid data layouts:
@@ -200,4 +200,4 @@
 };
 } // namespace cpu
 } // namespace arm_compute
-#endif /* ARM_COMPUTE_CPU_GEMMCONVOLUTION_H */
+#endif /* ARM_COMPUTE_CPU_GEMM_CONV2D_H */