aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2020-08-28 13:52:12 +0100
committerGian Marco Iodice <gianmarco.iodice@arm.com>2020-08-28 16:28:34 +0000
commit026d04576d3058e34f8f7e23f7a11514a04952dc (patch)
treecc743de9348479a754b3eee0bb4f71444bb5ed1e /src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp
parent1c76c1ddcd1294ee8149bd74ecf6f62963408286 (diff)
downloadComputeLibrary-026d04576d3058e34f8f7e23f7a11514a04952dc.tar.gz
COMPMID-3770: Add batch size in the OpenCL GEMM kernel selection
Change-Id: Ia3030ea701e9ceb2ef567e0258e8f478e18b8b55 Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3871 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp')
-rw-r--r--src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp b/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp
index 44700ad4f4..324c2f7dca 100644
--- a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp
+++ b/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp
@@ -45,7 +45,7 @@ CLGEMMKernelType CLGEMMKernelSelectionMidgard::select_kernel(const CLGEMMKernelS
// _target could be used in the future to have a dedicated heuristic for each GPU IP
ARM_COMPUTE_UNUSED(_target);
- using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMKernelSelectionMidgard::*)(unsigned int m, unsigned int n, unsigned int k, bool is_rhs_constant);
+ using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMKernelSelectionMidgard::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant);
// Configurations for Midgard architectures
static std::map<DataType, FunctionExecutorPtr> gemm_configs =
@@ -62,31 +62,31 @@ CLGEMMKernelType CLGEMMKernelSelectionMidgard::select_kernel(const CLGEMMKernelS
if(gemm_configs.find(data_type) != gemm_configs.end())
{
- return (this->*gemm_configs[data_type])(params.m, params.n, params.k, params.is_rhs_constant);
+ return (this->*gemm_configs[data_type])(params.m, params.n, params.k, params.b, params.is_rhs_constant);
}
ARM_COMPUTE_ERROR("Not supported data type");
}
-CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f32(unsigned int m, unsigned int n, unsigned int k, bool is_rhs_constant)
+CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant)
{
- ARM_COMPUTE_UNUSED(n, k);
+ ARM_COMPUTE_UNUSED(n, k, b);
// We reshape the matrices only if we do not have the vector-by-matrix case and we reshape the matrix B only once
return ((m != 1) && is_rhs_constant) ? CLGEMMKernelType::RESHAPED_V1 : CLGEMMKernelType::NATIVE_V1;
}
-CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f16(unsigned int m, unsigned int n, unsigned int k, bool is_rhs_constant)
+CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant)
{
- ARM_COMPUTE_UNUSED(n, k);
+ ARM_COMPUTE_UNUSED(n, k, b);
// We reshape the matrices only if we do not have the vector-by-matrix case and we reshape the matrix B only once
return ((m != 1) && is_rhs_constant) ? CLGEMMKernelType::RESHAPED_V1 : CLGEMMKernelType::NATIVE_V1;
}
-CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_q8(unsigned int m, unsigned int n, unsigned int k, bool is_rhs_constant)
+CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant)
{
- ARM_COMPUTE_UNUSED(m, n, k, is_rhs_constant);
+ ARM_COMPUTE_UNUSED(m, n, k, b, is_rhs_constant);
return CLGEMMKernelType::NATIVE;
}