COMPMID-2378: Sanitize GEMM configuration for NEON

Change-Id: I7859b82b2059e14685f8792424648ac5eacd67f1
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1418
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/NEON/functions/NEGEMMAssemblyDispatch.h b/arm_compute/runtime/NEON/functions/NEGEMMAssemblyDispatch.h
index 2fc2cf4..b5a2978 100644
--- a/arm_compute/runtime/NEON/functions/NEGEMMAssemblyDispatch.h
+++ b/arm_compute/runtime/NEON/functions/NEGEMMAssemblyDispatch.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -64,17 +64,17 @@
 
     /** If supported create the ACL function corresponding to the GemmMethod provided to process the other passed parameters
      *
-     * @param[in]  method             GemmMethod to use to perform the matrix multiplication.
-     * @param[in]  a                  Input tensor (Matrix A).
-     * @param[in]  b                  Input tensor (Matrix B).
-     * @param[out] d                  Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
-     * @param[in]  alpha              Scalar multiplier to apply to AB matrix product.
-     * @param[in]  beta               Scalar multiplier to apply to input D matrix before adding product.
-     * @param[in]  pretransposed_hint Can the B tensor can be pretransposed (ie shared across invocations)?
+     * @param[in]  method    GemmMethod to use to perform the matrix multiplication.
+     * @param[in]  a         Input tensor (Matrix A).
+     * @param[in]  b         Input tensor (Matrix B).
+     * @param[out] d         Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
+     * @param[in]  alpha     Scalar multiplier to apply to AB matrix product.
+     * @param[in]  beta      Scalar multiplier to apply to input D matrix before adding product.
+     * @param[in]  gemm_info GEMM meta-data
      *
      * @return True if the method is supported and the function was successfully created, false otherwise.
      */
-    bool create_function(arm_gemm::GemmMethod method, const ITensor *a, const ITensor *b, ITensor *d, float alpha, float beta, bool pretranspose_hint);
+    bool create_function(arm_gemm::GemmMethod method, const ITensor *a, const ITensor *b, ITensor *d, float alpha, float beta, const GEMMInfo &gemm_info);
 
     /** Interface for the arm_gemm fallback */
     std::unique_ptr<IFallback>      _arm_gemm;
@@ -83,27 +83,27 @@
 public:
     /** If supported create an ACL function else fallback to the arm_gemm function.
      *
-     * @param[in]  a                 Input tensor (Matrix A)
-     * @param[in]  b                 Input tensor (Matrix B)
-     * @param[out] d                 Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
-     * @param[in]  alpha             Scalar multiplier to apply to AB matrix product.
-     * @param[in]  beta              Scalar multiplier to apply to input D matrix before adding product.
-     * @param[in]  pretranspose_hint Can the B tensor can be pretransposed (ie shared across invocations)?
+     * @param[in]  a         Input tensor (Matrix A)
+     * @param[in]  b         Input tensor (Matrix B)
+     * @param[out] d         Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
+     * @param[in]  alpha     Scalar multiplier to apply to AB matrix product.
+     * @param[in]  beta      Scalar multiplier to apply to input D matrix before adding product.
+     * @param[in]  gemm_info GEMM meta-data
      */
-    void configure(const ITensor *a, const ITensor *b, ITensor *d, float alpha, float beta, bool pretranspose_hint);
+    void configure(const ITensor *a, const ITensor *b, ITensor *d, float alpha, float beta, const GEMMInfo &gemm_info);
 
     /** Indicates whether or not this function can be used to process the given parameters.
      *
-     * @param[in] a                 Input tensor (Matrix A)
-     * @param[in] b                 Input tensor (Matrix B)
-     * @param[in] d                 Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
-     * @param[in] alpha             Scalar multiplier to apply to AB matrix product.
-     * @param[in] beta              Scalar multiplier to apply to input D matrix before adding product.
-     * @param[in] pretranspose_hint Can the B tensor can be pretransposed (ie shared across invocations)?
+     * @param[in] a         Input tensor (Matrix A)
+     * @param[in] b         Input tensor (Matrix B)
+     * @param[in] d         Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
+     * @param[in] alpha     Scalar multiplier to apply to AB matrix product.
+     * @param[in] beta      Scalar multiplier to apply to input D matrix before adding product.
+     * @param[in] gemm_info GEMM meta-data
      *
      * @return a status.
      */
-    static Status validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *d, float alpha, float beta, bool pretranspose_hint);
+    static Status validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *d, float alpha, float beta, const GEMMInfo &gemm_info);
     /** Was the function successfully configured ?
      *
      * @return True if the function is configured and ready to run
diff --git a/arm_compute/runtime/NEON/functions/assembly/NEGEMMInterleavedWrapper.h b/arm_compute/runtime/NEON/functions/assembly/NEGEMMInterleavedWrapper.h
index 9495647..ad89e1f 100644
--- a/arm_compute/runtime/NEON/functions/assembly/NEGEMMInterleavedWrapper.h
+++ b/arm_compute/runtime/NEON/functions/assembly/NEGEMMInterleavedWrapper.h
@@ -104,14 +104,14 @@
      *
      * @note The input and output tensor must have the same dimensions
      *
-     * @param[in]  a              Input tensor (Matrix A)
-     * @param[in]  b              Input tensor (Matrix B)
-     * @param[out] c              Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
-     * @param[in]  alpha          Scalar multiplier to apply to AB matrix product.
-     * @param[in]  beta           Scalar multiplier to apply to input C matrix before adding product.
-     * @param[in]  pretranspose_b If true, pretranspose B once during the prepare() stage instead of on the fly every time.
+     * @param[in]  a         Input tensor (Matrix A)
+     * @param[in]  b         Input tensor (Matrix B)
+     * @param[out] c         Output tensor to store the result of matrix multiplication. Data type supported: same as @p input0.
+     * @param[in]  alpha     Scalar multiplier to apply to AB matrix product.
+     * @param[in]  beta      Scalar multiplier to apply to input C matrix before adding product.
+     * @param[in]  gemm_info GEMM meta-data
      */
-    void configure(const ITensor *a, const ITensor *b, ITensor *c, float alpha, float beta, bool pretranspose_b);
+    void configure(const ITensor *a, const ITensor *b, ITensor *c, float alpha, float beta, const GEMMInfo &gemm_info);
 
     // Inherited methods overridden:
     void run() override;