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 | |
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')
-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 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.cpp (renamed from src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp) | 62 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.h (renamed from src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.cpp (renamed from src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.cpp) | 34 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.h (renamed from src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h | 8 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.cpp (renamed from src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.cpp) | 82 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h (renamed from src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.cpp (renamed from src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.cpp) | 32 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.h (renamed from src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h) | 10 | ||||
-rw-r--r-- | src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h | 8 |
17 files changed, 201 insertions, 201 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"); } diff --git a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.cpp index 46eeff3524..749d125c01 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp +++ b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.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/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h" +#include "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -40,46 +40,46 @@ namespace cl_gemm { using namespace arm_compute::misc::shape_calculator; -CLGEMMReshapedKernelConfigurationBifrost::CLGEMMReshapedKernelConfigurationBifrost(GPUTarget gpu) +CLGEMMDefaultConfigReshapedBifrost::CLGEMMDefaultConfigReshapedBifrost(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMReshapedKernelConfigurationBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Mali-G76 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G76 = { - { DataType::F32, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_f32 }, - { DataType::F16, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedKernelConfigurationBifrost::configure_G76_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedBifrost::configure_G76_u8 } }; // Configurations for Mali-G52 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G52 = { - { DataType::F32, &CLGEMMReshapedKernelConfigurationBifrost::configure_G52_f32 }, - { DataType::F16, &CLGEMMReshapedKernelConfigurationBifrost::configure_G52_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedBifrost::configure_G52_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedBifrost::configure_G52_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 } }; // Configurations for Mali-G7x static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G7x = { - { DataType::F32, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_f32 }, - { DataType::F16, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8 } }; switch(_target) @@ -105,7 +105,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G7x_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -120,7 +120,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G7x_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -135,7 +135,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G7x_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G7x_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -164,7 +164,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { const float r_mn = static_cast<float>(m) / static_cast<float>(n); const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; @@ -263,7 +263,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); @@ -279,7 +279,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -329,10 +329,10 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; - const float r_mk = static_cast<float>(m) / static_cast<float>(k); + const float r_mk = static_cast<float>(m) / static_cast<float>(k); if(workload <= 1595.2000f) { @@ -358,7 +358,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationBifrost::configure_G76_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedBifrost::configure_G76_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/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.h index 715e7abfa3..814b831b69 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h +++ b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.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_CLGEMMRESHAPEDKERNELCONFIGURATIONBIFROST_H -#define ARM_COMPUTE_CLGEMMRESHAPEDKERNELCONFIGURATIONBIFROST_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDBIFROST_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDBIFROST_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Bifrost based OpenCL GEMMReshaped configuration */ -class CLGEMMReshapedKernelConfigurationBifrost final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigReshapedBifrost final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMReshapedKernelConfigurationBifrost(GPUTarget gpu); + CLGEMMDefaultConfigReshapedBifrost(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; @@ -55,4 +55,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMRESHAPEDKERNELCONFIGURATIONBIFROST_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDBIFROST_H */ diff --git a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.cpp b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.cpp index 4fd446f647..13c139e201 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.cpp +++ b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.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/reshaped/CLGEMMReshapedKernelConfigurationValhall.h" +#include "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -35,24 +35,24 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMReshapedKernelConfigurationValhall::CLGEMMReshapedKernelConfigurationValhall(GPUTarget gpu) +CLGEMMDefaultConfigReshapedValhall::CLGEMMDefaultConfigReshapedValhall(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMReshapedKernelConfigurationValhall::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedValhall::*)(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, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_f32 }, - { DataType::F16, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedKernelConfigurationValhall::configure_G77_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedValhall::configure_G77_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedValhall::configure_G77_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedValhall::configure_G77_u8 } }; switch(_target) @@ -70,7 +70,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -85,15 +85,15 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); const float r_mn = static_cast<float>(m) / static_cast<float>(n); const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; - const float r_mk = static_cast<float>(m) / static_cast<float>(k); - const float r_nk = static_cast<float>(n) / static_cast<float>(k); + const float r_mk = static_cast<float>(m) / static_cast<float>(k); + const float r_nk = static_cast<float>(n) / static_cast<float>(k); GEMMLHSMatrixInfo lhs_info_buf; GEMMRHSMatrixInfo rhs_info_buf; @@ -203,14 +203,14 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfiguratio std::tie(lhs_info_img, rhs_info_img) = configure_lhs_rhs_info(m, n, 4, 4, 4, 2, 1, true, false, true, false, true); return select_lhs_rhs_info(std::make_pair(lhs_info_img, rhs_info_img), - std::make_pair(lhs_info_buf, rhs_info_buf), - n, k, b, DataType::F16); + std::make_pair(lhs_info_buf, rhs_info_buf), + n, k, b, DataType::F16); } } } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedKernelConfigurationValhall::configure_G77_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedValhall::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/reshaped/CLGEMMReshapedKernelConfigurationValhall.h b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.h index 5f7e701e0e..2ce6482c46 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h +++ b/src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.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_CLGEMMRESHAPEDKERNELCONFIGURATIONVALHALL_H -#define ARM_COMPUTE_CLGEMMRESHAPEDKERNELCONFIGURATIONVALHALL_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDVALHALL_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDVALHALL_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Valhall based OpenCL GEMMReshaped configuration */ -class CLGEMMReshapedKernelConfigurationValhall final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigReshapedValhall final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMReshapedKernelConfigurationValhall(GPUTarget gpu); + CLGEMMDefaultConfigReshapedValhall(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_CLGEMMRESHAPEDKERNELCONFIGURATIONVALHALL_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDVALHALL_H */ diff --git a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h b/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h index 2a25dc1893..de60698a91 100644 --- a/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h +++ b/src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h @@ -25,8 +25,8 @@ #define ARM_COMPUTE_CLGEMMRESHAPEDKERNELCONFIGURATION_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" -#include "src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h" -#include "src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h" +#include "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.h" +#include "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.h" #include <memory> @@ -50,9 +50,9 @@ public: { case GPUTarget::MIDGARD: case GPUTarget::BIFROST: - return std::make_unique<CLGEMMReshapedKernelConfigurationBifrost>(gpu); + return std::make_unique<CLGEMMDefaultConfigReshapedBifrost>(gpu); case GPUTarget::VALHALL: - return std::make_unique<CLGEMMReshapedKernelConfigurationValhall>(gpu); + return std::make_unique<CLGEMMDefaultConfigReshapedValhall>(gpu); default: ARM_COMPUTE_ERROR("Not supported GPU target"); } diff --git a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.cpp b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.cpp index d5b76d8eaf..a193b931d9 100644 --- a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.cpp +++ b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.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/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h" +#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -40,58 +40,58 @@ namespace cl_gemm { using namespace arm_compute::misc::shape_calculator; -CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::CLGEMMReshapedOnlyRHSKernelConfigurationBifrost(GPUTarget gpu) +CLGEMMDefaultConfigReshapedRHSOnlyBifrost::CLGEMMDefaultConfigReshapedRHSOnlyBifrost(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::*)(unsigned int m, unsigned int n, unsigned int k, + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedRHSOnlyBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b); // Configurations for Mali-G51 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G51 = { - { DataType::F32, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_f32 }, - { DataType::F16, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_u8 } }; // Configurations for Mali-G52 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G52 = { - { DataType::F32, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G52_f32 }, - { DataType::F16, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G52_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 } }; // Configurations for Mali-G76 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G76 = { - { DataType::F32, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_f32 }, - { DataType::F16, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8 } }; // Configurations for Mali-G7x static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G7x = { - { DataType::F32, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_f32 }, - { DataType::F16, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8 } }; switch(_target) @@ -135,7 +135,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -157,7 +157,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -230,7 +230,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; const float r_nk = static_cast<float>(n) / static_cast<float>(k); @@ -274,7 +274,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -291,7 +291,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -315,12 +315,12 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { const float r_mn = static_cast<float>(m) / static_cast<float>(n); const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; - const float r_mk = static_cast<float>(m) / static_cast<float>(k); - const float r_nk = static_cast<float>(n) / static_cast<float>(k); + const float r_mk = static_cast<float>(m) / static_cast<float>(k); + const float r_nk = static_cast<float>(n) / static_cast<float>(k); GEMMLHSMatrixInfo lhs_info_buf; GEMMRHSMatrixInfo rhs_info_buf; @@ -402,7 +402,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); @@ -474,7 +474,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -491,7 +491,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G7x_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G7x_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -523,7 +523,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G76_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G76_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -539,7 +539,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationBifrost::configure_G51_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyBifrost::configure_G51_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/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h index 4d284ed3e8..db89d8317c 100644 --- a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h +++ b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.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_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONBIFROST_H -#define ARM_COMPUTE_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONBIFROST_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYBIFROST_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYBIFROST_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Bifrost based OpenCL GEMMReshapedOnlyRHS configuration */ -class CLGEMMReshapedOnlyRHSKernelConfigurationBifrost final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigReshapedRHSOnlyBifrost final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMReshapedOnlyRHSKernelConfigurationBifrost(GPUTarget gpu); + CLGEMMDefaultConfigReshapedRHSOnlyBifrost(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; @@ -58,4 +58,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /*ARM_COMPUTE_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONBIFROST_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYBIFROST_H */ diff --git a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.cpp b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.cpp index e0991674b1..ca7274c38e 100644 --- a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.cpp +++ b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.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/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h" +#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -40,25 +40,25 @@ namespace cl_gemm { using namespace arm_compute::misc::shape_calculator; -CLGEMMReshapedOnlyRHSKernelConfigurationValhall::CLGEMMReshapedOnlyRHSKernelConfigurationValhall(GPUTarget gpu) +CLGEMMDefaultConfigReshapedRHSOnlyValhall::CLGEMMDefaultConfigReshapedRHSOnlyValhall(GPUTarget gpu) : ICLGEMMKernelConfiguration(gpu) { } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) { - using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMReshapedOnlyRHSKernelConfigurationValhall::*)(unsigned int m, unsigned int n, unsigned int k, + using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (CLGEMMDefaultConfigReshapedRHSOnlyValhall::*)(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, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_f32 }, - { DataType::F16, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_f16 }, - { DataType::QASYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_u8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_u8 } + { DataType::F32, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_f32 }, + { DataType::F16, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_u8 }, + { DataType::QSYMM8, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_u8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_u8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_u8 } }; switch(_target) @@ -76,7 +76,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { if(m == 1) { @@ -121,7 +121,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi { const float r_mn = static_cast<float>(m) / static_cast<float>(n); const float workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; - const float r_mk = static_cast<float>(m) / static_cast<float>(k); + const float r_mk = static_cast<float>(m) / static_cast<float>(k); if(workload <= 1999.2000122070312) { @@ -175,14 +175,14 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi std::tie(lhs_info_buf, rhs_info_buf) = configure_lhs_rhs_info(m, n, 4, 4, 4, 1, 16, false, true, false, true, false); return select_lhs_rhs_info(std::make_pair(lhs_info_img, rhs_info_img), - std::make_pair(lhs_info_buf, rhs_info_buf), - n, k, b, DataType::F32); + std::make_pair(lhs_info_buf, rhs_info_buf), + n, k, b, DataType::F32); } } } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyValhall::configure_G77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b) { ARM_COMPUTE_UNUSED(k); ARM_COMPUTE_UNUSED(b); @@ -232,7 +232,7 @@ std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfi } } -std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMReshapedOnlyRHSKernelConfigurationValhall::configure_G77_u8(unsigned int m, unsigned int n, unsigned int k, unsigned int b) +std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigReshapedRHSOnlyValhall::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/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.h index b9289923b9..94c6a43c21 100644 --- a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h +++ b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.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_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONVALHALL_H -#define ARM_COMPUTE_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONVALHALL_H +#ifndef ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYVALHALL_H +#define ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYVALHALL_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Valhall based OpenCL GEMMReshapedOnlyRHS configuration */ -class CLGEMMReshapedOnlyRHSKernelConfigurationValhall final : public ICLGEMMKernelConfiguration +class CLGEMMDefaultConfigReshapedRHSOnlyValhall final : public ICLGEMMKernelConfiguration { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMReshapedOnlyRHSKernelConfigurationValhall(GPUTarget gpu); + CLGEMMDefaultConfigReshapedRHSOnlyValhall(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_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATIONVALHALL_H */ +#endif /*ARM_COMPUTE_CLGEMMDEFAULTCONFIGRESHAPEDRHSONLYVALHALL_H */ diff --git a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h index 96c3045119..001b98dca8 100644 --- a/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h +++ b/src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h @@ -25,8 +25,8 @@ #define ARM_COMPUTE_CLGEMMRESHAPEDONLYRHSKERNELCONFIGURATION_H #include "src/core/CL/ICLGEMMKernelConfiguration.h" -#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h" -#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h" +#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.h" +#include "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.h" #include <memory> @@ -50,9 +50,9 @@ public: { case GPUTarget::MIDGARD: case GPUTarget::BIFROST: - return std::make_unique<CLGEMMReshapedOnlyRHSKernelConfigurationBifrost>(gpu); + return std::make_unique<CLGEMMDefaultConfigReshapedRHSOnlyBifrost>(gpu); case GPUTarget::VALHALL: - return std::make_unique<CLGEMMReshapedOnlyRHSKernelConfigurationValhall>(gpu); + return std::make_unique<CLGEMMDefaultConfigReshapedRHSOnlyValhall>(gpu); default: ARM_COMPUTE_ERROR("Not supported GPU target"); } |