diff options
-rw-r--r-- | Android.bp | 20 | ||||
-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 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.cpp (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp) | 84 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.h (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.h) | 10 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.cpp (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp) | 26 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.h (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.h) | 10 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.cpp (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.cpp) | 50 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.h (renamed from src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.h) | 10 | ||||
-rw-r--r-- | src/runtime/CL/gemm/CLGEMMKernelSelection.h | 12 |
25 files changed, 312 insertions, 312 deletions
diff --git a/Android.bp b/Android.bp index bf68dd4535..8c29386a28 100644 --- a/Android.bp +++ b/Android.bp @@ -71,13 +71,13 @@ cc_library_static { "src/core/CL/ICLTensor.cpp", "src/core/CL/OpenCL.cpp", "src/core/CL/gemm/CLGEMMHelpers.cpp", - "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.cpp", - "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.cpp", - "src/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.cpp", - "src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.cpp", - "src/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.cpp", - "src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.cpp", - "src/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.cpp", + "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeBifrost.cpp", + "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeMidgard.cpp", + "src/core/CL/gemm/native/CLGEMMDefaultConfigNativeValhall.cpp", + "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedBifrost.cpp", + "src/core/CL/gemm/reshaped/CLGEMMDefaultConfigReshapedValhall.cpp", + "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyBifrost.cpp", + "src/core/CL/gemm/reshaped_only_rhs/CLGEMMDefaultConfigReshapedRHSOnlyValhall.cpp", "src/core/CL/kernels/CLAbsoluteDifferenceKernel.cpp", "src/core/CL/kernels/CLAccumulateKernel.cpp", "src/core/CL/kernels/CLActivationLayerKernel.cpp", @@ -584,9 +584,9 @@ cc_library_static { "src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp", "src/runtime/CL/functions/CLWinogradInputTransform.cpp", "src/runtime/CL/functions/CLYOLOLayer.cpp", - "src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp", - "src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp", - "src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.cpp", + "src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.cpp", + "src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.cpp", + "src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.cpp", "src/runtime/CL/tuners/BifrostTuner.cpp", "src/runtime/CL/tuners/CLLWSList.cpp", "src/runtime/CL/tuners/MidgardTuner.cpp", 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"); } diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp b/src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.cpp index 0bda38e5e9..5ac25a9a20 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.cpp +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -34,60 +34,60 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMKernelSelectionBifrost::CLGEMMKernelSelectionBifrost(GPUTarget gpu) +CLGEMMDefaultTypeBifrost::CLGEMMDefaultTypeBifrost(GPUTarget gpu) : ICLGEMMKernelSelection(gpu) { } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::select_kernel(const CLGEMMKernelSelectionParams ¶ms) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::select_kernel(const CLGEMMKernelSelectionParams ¶ms) { // _target could be used in the future to have a dedicated heuristic for each GPU IP ARM_COMPUTE_UNUSED(_target); - using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMKernelSelectionBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); + using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMDefaultTypeBifrost::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); // Default configurations for Bifrost architectures static std::map<DataType, FunctionExecutorPtr> gemm_default_configs = { - { DataType::F32, &CLGEMMKernelSelectionBifrost::default_f32 }, - { DataType::F16, &CLGEMMKernelSelectionBifrost::default_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionBifrost::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeBifrost::default_f32 }, + { DataType::F16, &CLGEMMDefaultTypeBifrost::default_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeBifrost::default_q8 } }; // Mali-G71 configurations static std::map<DataType, FunctionExecutorPtr> gemm_g71_configs = { - { DataType::F32, &CLGEMMKernelSelectionBifrost::default_f32 }, - { DataType::F16, &CLGEMMKernelSelectionBifrost::g71_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionBifrost::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeBifrost::default_f32 }, + { DataType::F16, &CLGEMMDefaultTypeBifrost::g71_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeBifrost::default_q8 } }; // Mali-G52 configurations static std::map<DataType, FunctionExecutorPtr> gemm_g52_configs = { - { DataType::F32, &CLGEMMKernelSelectionBifrost::g52_f32 }, - { DataType::F16, &CLGEMMKernelSelectionBifrost::g52_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionBifrost::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeBifrost::g52_f32 }, + { DataType::F16, &CLGEMMDefaultTypeBifrost::g52_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeBifrost::default_q8 } }; // Mali-G76 configurations static std::map<DataType, FunctionExecutorPtr> gemm_g76_configs = { - { DataType::F32, &CLGEMMKernelSelectionBifrost::g76_f32 }, - { DataType::F16, &CLGEMMKernelSelectionBifrost::g76_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionBifrost::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionBifrost::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeBifrost::g76_f32 }, + { DataType::F16, &CLGEMMDefaultTypeBifrost::g76_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeBifrost::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeBifrost::default_q8 } }; const DataType data_type = params.data_type; @@ -121,7 +121,7 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::select_kernel(const CLGEMMKernelS } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(b); @@ -162,7 +162,7 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_f32(unsigned int m, unsig return gemm_type; } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(n, k, b); @@ -183,7 +183,7 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_f16(unsigned int m, unsig } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(m, n, k, b); @@ -197,7 +197,7 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::default_q8(unsigned int m, unsign } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::g76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::g76_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(b); @@ -254,16 +254,16 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::g76_f32(unsigned int m, unsigned } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::g52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::g52_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(b); - if (!is_rhs_constant) + if(!is_rhs_constant) { return CLGEMMKernelType::NATIVE_V1; } - if (m == 1) + if(m == 1) { return CLGEMMKernelType::RESHAPED_ONLY_RHS; } @@ -381,16 +381,16 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::g52_f32(unsigned int m, unsigned } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::g76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::g76_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(b); - if (!is_rhs_constant) + if(!is_rhs_constant) { return CLGEMMKernelType::NATIVE_V1; } - if (m == 1) + if(m == 1) { return CLGEMMKernelType::RESHAPED_ONLY_RHS; } @@ -443,14 +443,14 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::g76_f16(unsigned int m, unsigned } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::g52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::g52_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { - if (!is_rhs_constant) + if(!is_rhs_constant) { return CLGEMMKernelType::NATIVE_V1; } - if (m == 1) + if(m == 1) { return CLGEMMKernelType::RESHAPED_ONLY_RHS; } @@ -556,7 +556,7 @@ CLGEMMKernelType CLGEMMKernelSelectionBifrost::g52_f16(unsigned int m, unsigned } } -CLGEMMKernelType CLGEMMKernelSelectionBifrost::g71_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeBifrost::g71_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(b); diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.h b/src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.h index 6831a12aec..0cbab35c2e 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.h +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef SRC_CLGEMMKERNELSELECTIONBIFROST_H -#define SRC_CLGEMMKERNELSELECTIONBIFROST_H +#ifndef SRC_CLGEMMDEFAULTTYPEBIFROST_H +#define SRC_CLGEMMDEFAULTTYPEBIFROST_H #include "arm_compute/runtime/CL/ICLGEMMKernelSelection.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Bifrost based OpenCL GEMMKernel selection */ -class CLGEMMKernelSelectionBifrost final : public ICLGEMMKernelSelection +class CLGEMMDefaultTypeBifrost final : public ICLGEMMKernelSelection { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMKernelSelectionBifrost(GPUTarget gpu); + CLGEMMDefaultTypeBifrost(GPUTarget gpu); // Inherited overridden method CLGEMMKernelType select_kernel(const CLGEMMKernelSelectionParams ¶ms) override; @@ -55,4 +55,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /* SRC_CLGEMMKERNELSELECTIONBIFROST_H */ +#endif /* SRC_CLGEMMDEFAULTTYPEBIFROST_H */ diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp b/src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.cpp index d172a827b5..88b6060e12 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.cpp +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -35,27 +35,27 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMKernelSelectionMidgard::CLGEMMKernelSelectionMidgard(GPUTarget gpu) +CLGEMMDefaultTypeMidgard::CLGEMMDefaultTypeMidgard(GPUTarget gpu) : ICLGEMMKernelSelection(gpu) { } -CLGEMMKernelType CLGEMMKernelSelectionMidgard::select_kernel(const CLGEMMKernelSelectionParams ¶ms) +CLGEMMKernelType CLGEMMDefaultTypeMidgard::select_kernel(const CLGEMMKernelSelectionParams ¶ms) { // _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, unsigned int b, bool is_rhs_constant); + using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMDefaultTypeMidgard::*)(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 = { - { DataType::F32, &CLGEMMKernelSelectionMidgard::default_f32 }, - { DataType::F16, &CLGEMMKernelSelectionMidgard::default_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionMidgard::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionMidgard::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionMidgard::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionMidgard::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeMidgard::default_f32 }, + { DataType::F16, &CLGEMMDefaultTypeMidgard::default_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeMidgard::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeMidgard::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeMidgard::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeMidgard::default_q8 } }; const DataType data_type = params.data_type; @@ -68,7 +68,7 @@ CLGEMMKernelType CLGEMMKernelSelectionMidgard::select_kernel(const CLGEMMKernelS ARM_COMPUTE_ERROR("Not supported data type"); } -CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeMidgard::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(n, k, b); @@ -76,7 +76,7 @@ CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f32(unsigned int m, unsig 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, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeMidgard::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(n, k, b); @@ -84,7 +84,7 @@ CLGEMMKernelType CLGEMMKernelSelectionMidgard::default_f16(unsigned int m, unsig 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, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeMidgard::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(m, n, k, b, is_rhs_constant); diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.h b/src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.h index 3f6003f7dc..241072fd58 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.h +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef SRC_CLGEMMKERNELSELECTIONMIDGARD_H -#define SRC_CLGEMMKERNELSELECTIONMIDGARD_H +#ifndef SRC_CLGEMMDefaultTypeMidgard_H +#define SRC_CLGEMMDefaultTypeMidgard_H #include "arm_compute/runtime/CL/ICLGEMMKernelSelection.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Midgard based OpenCL GEMMKernel selection */ -class CLGEMMKernelSelectionMidgard final : public ICLGEMMKernelSelection +class CLGEMMDefaultTypeMidgard final : public ICLGEMMKernelSelection { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMKernelSelectionMidgard(GPUTarget gpu); + CLGEMMDefaultTypeMidgard(GPUTarget gpu); // Inherited overridden method CLGEMMKernelType select_kernel(const CLGEMMKernelSelectionParams ¶ms) override; @@ -50,4 +50,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /* SRC_CLGEMMKERNELSELECTIONMIDGARD_H */ +#endif /* SRC_CLGEMMDefaultTypeMidgard_H */ diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.cpp b/src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.cpp index da41859b87..ad74368889 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.cpp +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.cpp @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.h" #include "arm_compute/core/CL/CLHelpers.h" #include "arm_compute/core/CL/CLKernelLibrary.h" @@ -34,38 +34,38 @@ namespace arm_compute { namespace cl_gemm { -CLGEMMKernelSelectionValhall::CLGEMMKernelSelectionValhall(GPUTarget gpu) +CLGEMMDefaultTypeValhall::CLGEMMDefaultTypeValhall(GPUTarget gpu) : ICLGEMMKernelSelection(gpu) { } -CLGEMMKernelType CLGEMMKernelSelectionValhall::select_kernel(const CLGEMMKernelSelectionParams ¶ms) +CLGEMMKernelType CLGEMMDefaultTypeValhall::select_kernel(const CLGEMMKernelSelectionParams ¶ms) { // _target could be used in the future to have a dedicated heuristic for each GPU IP ARM_COMPUTE_UNUSED(_target); - using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMKernelSelectionValhall::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); + using FunctionExecutorPtr = CLGEMMKernelType (CLGEMMDefaultTypeValhall::*)(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); // Default configurations for Valhall architectures static std::map<DataType, FunctionExecutorPtr> gemm_default_configs = { - { DataType::F32, &CLGEMMKernelSelectionValhall::default_f32 }, - { DataType::F16, &CLGEMMKernelSelectionValhall::default_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionValhall::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeValhall::default_f32 }, + { DataType::F16, &CLGEMMDefaultTypeValhall::default_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeValhall::default_q8 } }; // Mali-G77 configurations static std::map<DataType, FunctionExecutorPtr> gemm_g77_configs = { - { DataType::F32, &CLGEMMKernelSelectionValhall::default_f32 }, - { DataType::F16, &CLGEMMKernelSelectionValhall::g77_f16 }, - { DataType::QASYMM8, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QASYMM8_SIGNED, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QSYMM8, &CLGEMMKernelSelectionValhall::default_q8 }, - { DataType::QSYMM8_PER_CHANNEL, &CLGEMMKernelSelectionValhall::default_q8 } + { DataType::F32, &CLGEMMDefaultTypeValhall::default_f32 }, + { DataType::F16, &CLGEMMDefaultTypeValhall::g77_f16 }, + { DataType::QASYMM8, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QASYMM8_SIGNED, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QSYMM8, &CLGEMMDefaultTypeValhall::default_q8 }, + { DataType::QSYMM8_PER_CHANNEL, &CLGEMMDefaultTypeValhall::default_q8 } }; const DataType data_type = params.data_type; @@ -87,35 +87,35 @@ CLGEMMKernelType CLGEMMKernelSelectionValhall::select_kernel(const CLGEMMKernelS } } -CLGEMMKernelType CLGEMMKernelSelectionValhall::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeValhall::default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(m, n, k, b); return is_rhs_constant ? CLGEMMKernelType::RESHAPED_ONLY_RHS : CLGEMMKernelType::NATIVE_V1; } -CLGEMMKernelType CLGEMMKernelSelectionValhall::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeValhall::default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(m, n, k, b); return is_rhs_constant ? CLGEMMKernelType::RESHAPED_ONLY_RHS : CLGEMMKernelType::NATIVE_V1; } -CLGEMMKernelType CLGEMMKernelSelectionValhall::g77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeValhall::g77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { - if (!is_rhs_constant) + if(!is_rhs_constant) { return CLGEMMKernelType::NATIVE_V1; } - if (m == 1) + if(m == 1) { return CLGEMMKernelType::RESHAPED_ONLY_RHS; } - const float r_mn = static_cast<float>(m) / static_cast<float>(n); - 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_mn = static_cast<float>(m) / static_cast<float>(n); + 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 workload = (static_cast<float>(m) * static_cast<float>(n) * static_cast<float>(b)) / 20.0f; if(r_mk <= 0.6817956566810608) @@ -205,7 +205,7 @@ CLGEMMKernelType CLGEMMKernelSelectionValhall::g77_f16(unsigned int m, unsigned } } -CLGEMMKernelType CLGEMMKernelSelectionValhall::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) +CLGEMMKernelType CLGEMMDefaultTypeValhall::default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant) { ARM_COMPUTE_UNUSED(m, n, k, b); diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.h b/src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.h index 82e46f694e..2fae838cc3 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.h +++ b/src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef SRC_CLGEMMKERNELSELECTIONVALHALL_H -#define SRC_CLGEMMKERNELSELECTIONVALHALL_H +#ifndef SRC_CLGEMMDEFAULTTYPEVALHALL_H +#define SRC_CLGEMMDEFAULTTYPEVALHALL_H #include "arm_compute/runtime/CL/ICLGEMMKernelSelection.h" @@ -31,14 +31,14 @@ namespace arm_compute namespace cl_gemm { /** Valhall based OpenCL GEMMKernel selection */ -class CLGEMMKernelSelectionValhall final : public ICLGEMMKernelSelection +class CLGEMMDefaultTypeValhall final : public ICLGEMMKernelSelection { public: /** Constructor * * @param[in] gpu GPU target */ - CLGEMMKernelSelectionValhall(GPUTarget gpu); + CLGEMMDefaultTypeValhall(GPUTarget gpu); // Inherited overridden method CLGEMMKernelType select_kernel(const CLGEMMKernelSelectionParams ¶ms) override; @@ -51,4 +51,4 @@ private: }; } // namespace cl_gemm } // namespace arm_compute -#endif /* SRC_CLGEMMKERNELSELECTIONVALHALL_H */ +#endif /* SRC_CLGEMMDEFAULTTYPEVALHALL_H */ diff --git a/src/runtime/CL/gemm/CLGEMMKernelSelection.h b/src/runtime/CL/gemm/CLGEMMKernelSelection.h index 69f8349d27..6189a324cf 100644 --- a/src/runtime/CL/gemm/CLGEMMKernelSelection.h +++ b/src/runtime/CL/gemm/CLGEMMKernelSelection.h @@ -25,9 +25,9 @@ #define SRC_CLGEMMKERNELSELECTION_H #include "arm_compute/runtime/CL/ICLGEMMKernelSelection.h" -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionBifrost.h" -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionMidgard.h" -#include "src/runtime/CL/gemm/CLGEMMKernelSelectionValhall.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeBifrost.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeMidgard.h" +#include "src/runtime/CL/gemm/CLGEMMDefaultTypeValhall.h" namespace arm_compute { @@ -48,11 +48,11 @@ public: switch(get_arch_from_target(gpu)) { case GPUTarget::MIDGARD: - return std::make_unique<CLGEMMKernelSelectionMidgard>(gpu); + return std::make_unique<CLGEMMDefaultTypeMidgard>(gpu); case GPUTarget::BIFROST: - return std::make_unique<CLGEMMKernelSelectionBifrost>(gpu); + return std::make_unique<CLGEMMDefaultTypeBifrost>(gpu); case GPUTarget::VALHALL: - return std::make_unique<CLGEMMKernelSelectionValhall>(gpu); + return std::make_unique<CLGEMMDefaultTypeValhall>(gpu); default: ARM_COMPUTE_ERROR("Not supported GPU target"); } |