diff options
Diffstat (limited to 'arm_compute/core/CL/gemm')
10 files changed, 53 insertions, 54 deletions
diff --git a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h index fced41b261..a6341e5094 100644 --- a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h +++ b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfiguration.h @@ -26,6 +26,7 @@ #include "arm_compute/core/CL/ICLGEMMKernelConfiguration.h" #include "arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h" +#include "arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h" #include "arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h" #include <memory> @@ -49,12 +50,11 @@ public: switch(get_arch_from_target(gpu)) { case GPUTarget::MIDGARD: + return support::cpp14::make_unique<CLGEMMNativeKernelConfigurationMidgard>(gpu); case GPUTarget::BIFROST: return support::cpp14::make_unique<CLGEMMNativeKernelConfigurationBifrost>(gpu); - break; case GPUTarget::VALHALL: return support::cpp14::make_unique<CLGEMMNativeKernelConfigurationValhall>(gpu); - break; default: ARM_COMPUTE_ERROR("Not supported GPU target"); } diff --git a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h index 29b8e08a80..5b2abe6f0f 100644 --- a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h +++ b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationBifrost.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMNativeKernelConfigurationBifrost(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMNativeKernelConfigurationBifrost(const CLGEMMNativeKernelConfigurationBifrost &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMNativeKernelConfigurationBifrost &operator=(const CLGEMMNativeKernelConfigurationBifrost &) = delete; - /** Default Move Constructor. */ - CLGEMMNativeKernelConfigurationBifrost(CLGEMMNativeKernelConfigurationBifrost &&) = default; - /** Default move assignment operator */ - CLGEMMNativeKernelConfigurationBifrost &operator=(CLGEMMNativeKernelConfigurationBifrost &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; diff --git a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h new file mode 100644 index 0000000000..0e95a15613 --- /dev/null +++ b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationMidgard.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 ARM Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * 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 + +#include "arm_compute/core/CL/ICLGEMMKernelConfiguration.h" + +namespace arm_compute +{ +namespace cl_gemm +{ +/** Midgard based OpenCL GEMMNative configuration */ +class CLGEMMNativeKernelConfigurationMidgard final : public ICLGEMMKernelConfiguration +{ +public: + /** Constructor + * + * @param[in] gpu GPU target + */ + CLGEMMNativeKernelConfigurationMidgard(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; + +private: + std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b); +}; +} // namespace cl_gemm +} // namespace arm_compute +#endif /*ARM_COMPUTE_CLGEMMNATIVEKERNELCONFIGURATIONMIDGARD_H */ diff --git a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h index f6a61a24b8..e739997b3a 100644 --- a/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h +++ b/arm_compute/core/CL/gemm/native/CLGEMMNativeKernelConfigurationValhall.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMNativeKernelConfigurationValhall(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMNativeKernelConfigurationValhall(const CLGEMMNativeKernelConfigurationValhall &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMNativeKernelConfigurationValhall &operator=(const CLGEMMNativeKernelConfigurationValhall &) = delete; - /** Default Move Constructor. */ - CLGEMMNativeKernelConfigurationValhall(CLGEMMNativeKernelConfigurationValhall &&) = default; - /** Default move assignment operator */ - CLGEMMNativeKernelConfigurationValhall &operator=(CLGEMMNativeKernelConfigurationValhall &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; diff --git a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h index e960d64964..10dc9aefdb 100644 --- a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h +++ b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfiguration.h @@ -51,10 +51,8 @@ public: case GPUTarget::MIDGARD: case GPUTarget::BIFROST: return support::cpp14::make_unique<CLGEMMReshapedKernelConfigurationBifrost>(gpu); - break; case GPUTarget::VALHALL: return support::cpp14::make_unique<CLGEMMReshapedKernelConfigurationValhall>(gpu); - break; default: ARM_COMPUTE_ERROR("Not supported GPU target"); } diff --git a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h index c6ece758b9..55742e3e56 100644 --- a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h +++ b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationBifrost.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMReshapedKernelConfigurationBifrost(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedKernelConfigurationBifrost(const CLGEMMReshapedKernelConfigurationBifrost &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedKernelConfigurationBifrost &operator=(const CLGEMMReshapedKernelConfigurationBifrost &) = delete; - /** Default Move Constructor. */ - CLGEMMReshapedKernelConfigurationBifrost(CLGEMMReshapedKernelConfigurationBifrost &&) = default; - /** Default move assignment operator */ - CLGEMMReshapedKernelConfigurationBifrost &operator=(CLGEMMReshapedKernelConfigurationBifrost &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; diff --git a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h index 0dd2a2c38f..e65974144d 100644 --- a/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h +++ b/arm_compute/core/CL/gemm/reshaped/CLGEMMReshapedKernelConfigurationValhall.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMReshapedKernelConfigurationValhall(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedKernelConfigurationValhall(const CLGEMMReshapedKernelConfigurationValhall &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedKernelConfigurationValhall &operator=(const CLGEMMReshapedKernelConfigurationValhall &) = delete; - /** Default Move Constructor. */ - CLGEMMReshapedKernelConfigurationValhall(CLGEMMReshapedKernelConfigurationValhall &&) = default; - /** Default move assignment operator */ - CLGEMMReshapedKernelConfigurationValhall &operator=(CLGEMMReshapedKernelConfigurationValhall &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; diff --git a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h index 683e39f3c1..7909726164 100644 --- a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h +++ b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfiguration.h @@ -51,10 +51,8 @@ public: case GPUTarget::MIDGARD: case GPUTarget::BIFROST: return support::cpp14::make_unique<CLGEMMReshapedOnlyRHSKernelConfigurationBifrost>(gpu); - break; case GPUTarget::VALHALL: return support::cpp14::make_unique<CLGEMMReshapedOnlyRHSKernelConfigurationValhall>(gpu); - break; default: ARM_COMPUTE_ERROR("Not supported GPU target"); } diff --git a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h index ff351b6a06..044bdc7b18 100644 --- a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h +++ b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationBifrost.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMReshapedOnlyRHSKernelConfigurationBifrost(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedOnlyRHSKernelConfigurationBifrost(const CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &operator=(const CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &) = delete; - /** Default Move Constructor. */ - CLGEMMReshapedOnlyRHSKernelConfigurationBifrost(CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &&) = default; - /** Default move assignment operator */ - CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &operator=(CLGEMMReshapedOnlyRHSKernelConfigurationBifrost &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; diff --git a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h index 7541802776..6dba6fdb00 100644 --- a/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h +++ b/arm_compute/core/CL/gemm/reshaped_only_rhs/CLGEMMReshapedOnlyRHSKernelConfigurationValhall.h @@ -39,14 +39,6 @@ public: * @param[in] gpu GPU target */ CLGEMMReshapedOnlyRHSKernelConfigurationValhall(GPUTarget gpu); - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedOnlyRHSKernelConfigurationValhall(const CLGEMMReshapedOnlyRHSKernelConfigurationValhall &) = delete; - /** Prevent instances of this class from being copied (As this class contains pointers) */ - CLGEMMReshapedOnlyRHSKernelConfigurationValhall &operator=(const CLGEMMReshapedOnlyRHSKernelConfigurationValhall &) = delete; - /** Default Move Constructor. */ - CLGEMMReshapedOnlyRHSKernelConfigurationValhall(CLGEMMReshapedOnlyRHSKernelConfigurationValhall &&) = default; - /** Default move assignment operator */ - CLGEMMReshapedOnlyRHSKernelConfigurationValhall &operator=(CLGEMMReshapedOnlyRHSKernelConfigurationValhall &&) = default; // Inherited overridden method std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override; |