diff options
author | SiCong Li <sicong.li@arm.com> | 2020-12-02 14:54:34 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-12-03 23:17:44 +0000 |
commit | a085a0c91c5b3061e616fa810d81be5798b240d8 (patch) | |
tree | b7f880f948969ff1383f671f36ca17f4d38f32fe /src/core/CL/gemm/native | |
parent | cd22cbfd02a4fcb49cb40622372a13b865db80ee (diff) | |
download | ComputeLibrary-a085a0c91c5b3061e616fa810d81be5798b240d8.tar.gz |
Rename the files and classes required by the OpenCL GEMM heuristic
All existing kernel type selection heuristics
CLGEMMKernelSelection<Architecture> are renamed to
CLGEMMDefaultType<Architecture>
All existing kernel configuration heuristics
CLGEMM<KernelType>KernelConfiguration<Architecture> are renamed to
CLGEMMDefaultConfig<KernelType><Architecture>
This refactoring is required to make room for tuner-based heuristics
Resolves COMPMID-3842
Change-Id: I2c9f1029ad67f1e2808c79871698fc4486d45306
Signed-off-by: SiCong Li <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4639
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/gemm/native')
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.cpp (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.cpp) | 50 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.h (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.cpp (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.cpp) | 18 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.h (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.cpp (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.cpp) | 26 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.h (renamed from src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h | 12 |
7 files changed, 68 insertions, 68 deletions
diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.cpp b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.cpp index 4cc3d6ae74..b769802663 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.cpp +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -35,44 +35,44 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMNativeKernelConfigurationBifrost::CLGEMMNativeKernelConfigurationBifrost(GPUTarget gpu) +CLGEMMDefaultConfigNativeBifrost::CLGEMMDefaultConfigNativeBifrost(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMNativeKernelConfigurationBifrost::*)(unsigned int m, unsigned int n, unsigned int k, + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigNativeBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Mali-G71 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G71 = { - { DataType::F32, &CLGEMMNativeKernelConfigurationBifrost::configure_G71_f32 }, - { DataType::QASYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_G71_u8 }, - { DataType::QSYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_G71_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMNativeKernelConfigurationBifrost::configure_G71_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMNativeKernelConfigurationBifrost::configure_G71_u8 } + { DataType::F32, &CLGEMMDefaultConfigNativeBifrost::configure_G71_f32 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_G71_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_G71_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigNativeBifrost::configure_G71_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigNativeBifrost::configure_G71_u8 } }; // Configurations for Mali-G76 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G76 = { - { DataType::F32, &CLGEMMNativeKernelConfigurationBifrost::configure_G76_f32 }, - { DataType::QASYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMNativeKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMNativeKernelConfigurationBifrost::configure_G76_u8 } + { DataType::F32, &CLGEMMDefaultConfigNativeBifrost::configure_G76_f32 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_G76_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_G76_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigNativeBifrost::configure_G76_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigNativeBifrost::configure_G76_u8 } }; // Default configurations static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_default = { - { DataType::F32, &CLGEMMNativeKernelConfigurationBifrost::configure_default_f32 }, - { DataType::QASYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_default_u8 }, - { DataType::QSYMM8, &CLGEMMNativeKernelConfigurationBifrost::configure_default_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMNativeKernelConfigurationBifrost::configure_default_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMNativeKernelConfigurationBifrost::configure_default_u8 } + { DataType::F32, &CLGEMMDefaultConfigNativeBifrost::configure_default_f32 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_default_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigNativeBifrost::configure_default_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigNativeBifrost::configure_default_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigNativeBifrost::configure_default_u8 } }; switch(_target) @@ -107,7 +107,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_G71_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_G71_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -133,7 +133,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_G71_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_G71_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -187,7 +187,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -220,7 +220,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_G76_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_G76_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -253,7 +253,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -261,7 +261,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationB return configure_lhs_rhs_info(m, n, 5, 4, 4, 1, 1, false, false, false, false); } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationBifrost::configure_default_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeBifrost::configure_default_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.h index 1e7432c89a..78d47a8195 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.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_CLGEMMNATIVEKERNELCONFIGURATIONBIFROST_H -#define ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONBIFROST_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEBIFROST_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEBIFROST_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Bifrost based OpenCL GEMMNative configuration */ -class CLGEMMNativeKernelConfigurationBifrost final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigNativeBifrost final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMNativeKernelConfigurationBifrost(GPUTarget gpu); + CLGEMMDefaultConfigNativeBifrost(GPUTarget gpu); // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; @@ -53,4 +53,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONBIFROST_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEBIFROST_H */ diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.cpp b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.cpp index fd699a08f7..18a899047a 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.cpp +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -35,23 +35,23 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMNativeKernelConfigurationMidgard::CLGEMMNativeKernelConfigurationMidgard(GPUTarget gpu) +CLGEMMDefaultConfigNativeMidgard::CLGEMMDefaultConfigNativeMidgard(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationMidgard::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeMidgard::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMNativeKernelConfigurationMidgard::*)(unsigned int m, unsigned int n, unsigned int k, + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigNativeMidgard::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Midgard architectures static std::map<DataType, ConfigurationFunctionExecutorPtr> default_configs = { - { DataType::QASYMM8, &CLGEMMNativeKernelConfigurationMidgard::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMNativeKernelConfigurationMidgard::default_q8 }, - { DataType::QSYMM8, &CLGEMMNativeKernelConfigurationMidgard::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMNativeKernelConfigurationMidgard::default_q8 } + { DataType::QASYMM8, &CLGEMMDefaultConfigNativeMidgard::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigNativeMidgard::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigNativeMidgard::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigNativeMidgard::default_q8 } }; if(default_configs.find(data_type) != default_configs.end()) @@ -61,7 +61,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationM ARM_COMPUTE_ERROR("Not supported data type"); } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationMidgard::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeMidgard::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.h index 2f6671706e..40c91d42b1 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.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_CLGEMMNATIVEKERNELCONFIGURATIONMIDGARD_H -#define ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONMIDGARD_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEMIDGARD_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEMIDGARD_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Midgard based OpenCL GEMMNative configuration */ -class CLGEMMNativeKernelConfigurationMidgard final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigNativeMidgard final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMNativeKernelConfigurationMidgard(GPUTarget gpu); + CLGEMMDefaultConfigNativeMidgard(GPUTarget gpu); // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; @@ -48,4 +48,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONMIDGARD_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEMIDGARD_H */ diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.cpp b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.cpp index 2c82340eef..ab5aa11bf8 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.cpp +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -35,25 +35,25 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMNativeKernelConfigurationValhall::CLGEMMNativeKernelConfigurationValhall(GPUTarget gpu) +CLGEMMDefaultConfigNativeValhall::CLGEMMDefaultConfigNativeValhall(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMNativeKernelConfigurationValhall::*)(unsigned int m, unsigned int n, unsigned int k, + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigNativeValhall::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Mali-G77 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G77 = { - { DataType::F32, &CLGEMMNativeKernelConfigurationValhall::configure_G77_f32 }, - { DataType::F16, &CLGEMMNativeKernelConfigurationValhall::configure_G77_f16 }, - { DataType::QASYMM8, &CLGEMMNativeKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8, &CLGEMMNativeKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMNativeKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMNativeKernelConfigurationValhall::configure_G77_u8 } + { DataType::F32, &CLGEMMDefaultConfigNativeValhall::configure_G77_f32 }, + { DataType::F16, &CLGEMMDefaultConfigNativeValhall::configure_G77_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigNativeValhall::configure_G77_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigNativeValhall::configure_G77_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigNativeValhall::configure_G77_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigNativeValhall::configure_G77_u8 } }; switch(_target) @@ -71,7 +71,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationV } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -97,7 +97,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationV } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -123,7 +123,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationV } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMNativeKernelConfigurationValhall::configure_G77_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.h index fb51b02edf..08d2d57a3e 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h +++ b/src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.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_CLGEMMNATIVEKERNELCONFIGURATIONVALHALL_H -#define ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONVALHALL_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEVALHALL_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEVALHALL_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Valhall based OpenCL GEMMNative configuration */ -class CLGEMMNativeKernelConfigurationValhall final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigNativeValhall final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMNativeKernelConfigurationValhall(GPUTarget gpu); + CLGEMMDefaultConfigNativeValhall(GPUTarget gpu); // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; @@ -50,4 +50,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONVALHALL_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGNATIVEVALHALL_H */ diff --git a/src/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h b/src/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h index 65396b1d98..39a534e817 100644 --- a/src/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h +++ b/src/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h @@ -25,9 +25,9 @@ #define ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATION_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h" -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h" -#include "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.h" +#include "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.h" #include <memory> @@ -50,11 +50,11 @@ public: switch(get_arch_from_target(gpu)) { case GPUTarget::MIDGARD: - return std::make_unique<CLGEMMNativeKernelConfigurationMidgard>(gpu); + return std::make_unique<CLGEMMDefaultConfigNativeMidgard>(gpu); case GPUTarget::BIFROST: - return std::make_unique<CLGEMMNativeKernelConfigurationBifrost>(gpu); + return std::make_unique<CLGEMMDefaultConfigNativeBifrost>(gpu); case GPUTarget::VALHALL: - return std::make_unique<CLGEMMNativeKernelConfigurationValhall>(gpu); + return std::make_unique<CLGEMMDefaultConfigNativeValhall>(gpu); default: ARM_COMPUTE_ERROR("Not supported GPU target"); } |