aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/mlgo/Common.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-02-23 00:00:42 +0000
committerMichele Di Giorgio <michele.digiorgio@arm.com>2021-02-23 22:29:07 +0000
commit261df74754f0feb632f1b604091da927aacb6f7c (patch)
tree5c7fe84d270dc2d5536ed344d05c6c38f1016a57 /src/runtime/CL/mlgo/Common.h
parent2ae08600d6266f10a13f0ced3039d94b3c1e8dbe (diff)
downloadComputeLibrary-261df74754f0feb632f1b604091da927aacb6f7c.tar.gz
Avoid division with zero on CLGEMM lhs/rhs configuration
Resolves COMPMID-4285 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I414e3ba352ed86345d6355d9ae366ea92e641842 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5153 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/mlgo/Common.h')
-rw-r--r--src/runtime/CL/mlgo/Common.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/runtime/CL/mlgo/Common.h b/src/runtime/CL/mlgo/Common.h
index 9e06689cc8..c451bd9062 100644
--- a/src/runtime/CL/mlgo/Common.h
+++ b/src/runtime/CL/mlgo/Common.h
@@ -45,35 +45,35 @@ using GEMMType = CLGEMMKernelType;
/** GEMM Configuration for Native kernel */
struct GEMMConfigNative
{
- unsigned int m0; /**< Number of rows processed by the matrix multiplication */
- unsigned int n0; /**< Number of columns processed by the matrix multiplication */
- unsigned int k0; /**< Number of partial accumulations performed by the matrix multiplication */
+ unsigned int m0{ 1 }; /**< Number of rows processed by the matrix multiplication */
+ unsigned int n0{ 1 }; /**< Number of columns processed by the matrix multiplication */
+ unsigned int k0{ 1 }; /**< Number of partial accumulations performed by the matrix multiplication */
};
/** GEMM Configuration for Reshaped Only RHS kernel */
struct GEMMConfigReshapedOnlyRHS
{
- unsigned int m0; /**< Number of rows processed by the matrix multiplication */
- unsigned int n0; /**< Number of columns processed by the matrix multiplication */
- unsigned int k0; /**< Number of partial accumulations performed by the matrix multiplication */
- unsigned int h0; /**< Number of horizontal blocks of size (k0xn0) stored on the same output row */
- bool interleave_rhs; /**< True if the h0 (k0xn0) blocks have to be interleaved in the output row */
- bool transpose_rhs; /**< True if the (k0xn0) block has to be transposed before been stored */
- bool export_cl_image; /**< True if the reshaped rhs has to be exported to cl_image. n0 must be equal to 4 */
+ unsigned int m0{ 1 }; /**< Number of rows processed by the matrix multiplication */
+ unsigned int n0{ 1 }; /**< Number of columns processed by the matrix multiplication */
+ unsigned int k0{ 1 }; /**< Number of partial accumulations performed by the matrix multiplication */
+ unsigned int h0{ 1 }; /**< Number of horizontal blocks of size (k0xn0) stored on the same output row */
+ bool interleave_rhs{ false }; /**< True if the h0 (k0xn0) blocks have to be interleaved in the output row */
+ bool transpose_rhs{ false }; /**< True if the (k0xn0) block has to be transposed before been stored */
+ bool export_cl_image{ false }; /**< True if the reshaped rhs has to be exported to cl_image. n0 must be equal to 4 */
};
/** GEMM Configuration for Reshaped kernel */
struct GEMMConfigReshaped
{
- unsigned int m0; /**< Number of rows processed by the matrix multiplication */
- unsigned int n0; /**< Number of columns processed by the matrix multiplication */
- unsigned int k0; /**< Number of partial accumulations performed by the matrix multiplication */
- unsigned int v0; /**< Number of vertical blocks of size (m0xk0) stored on the same output row */
- unsigned int h0; /**< Number of horizontal blocks of size (k0xn0) stored on the same output row */
- bool interleave_lhs; /**< True if the v0 (m0xk0) blocks have to be interleaved in the output row */
- bool interleave_rhs; /**< True if the h0 (k0xn0) blocks have to be interleaved in the output row */
- bool transpose_rhs; /**< True if the (k0xn0) block has to be transposed before been stored */
- bool export_cl_image; /**< True if the reshaped rhs has to be exported to cl_image. n0 must be equal to 4 */
+ unsigned int m0{ 1 }; /**< Number of rows processed by the matrix multiplication */
+ unsigned int n0{ 1 }; /**< Number of columns processed by the matrix multiplication */
+ unsigned int k0{ 1 }; /**< Number of partial accumulations performed by the matrix multiplication */
+ unsigned int v0{ 1 }; /**< Number of vertical blocks of size (m0xk0) stored on the same output row */
+ unsigned int h0{ 1 }; /**< Number of horizontal blocks of size (k0xn0) stored on the same output row */
+ bool interleave_lhs{ false }; /**< True if the v0 (m0xk0) blocks have to be interleaved in the output row */
+ bool interleave_rhs{ false }; /**< True if the h0 (k0xn0) blocks have to be interleaved in the output row */
+ bool transpose_rhs{ false }; /**< True if the (k0xn0) block has to be transposed before been stored */
+ bool export_cl_image{ false }; /**< True if the reshaped rhs has to be exported to cl_image. n0 must be equal to 4 */
};
} // namespace mlgo