Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 1 | /* |
Michele Di Giorgio | d9eaf61 | 2020-07-08 11:12:57 +0100 | [diff] [blame] | 2 | * Copyright (c) 2020 Arm Limited. |
Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
SiCong Li | a085a0c | 2020-12-02 14:54:34 +0000 | [diff] [blame] | 24 | #ifndef SRC_CLGEMMDEFAULTTYPEVALHALL_H |
| 25 | #define SRC_CLGEMMDEFAULTTYPEVALHALL_H |
Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 26 | |
| 27 | #include "arm_compute/runtime/CL/ICLGEMMKernelSelection.h" |
| 28 | |
| 29 | namespace arm_compute |
| 30 | { |
| 31 | namespace cl_gemm |
| 32 | { |
| 33 | /** Valhall based OpenCL GEMMKernel selection */ |
SiCong Li | a085a0c | 2020-12-02 14:54:34 +0000 | [diff] [blame] | 34 | class CLGEMMDefaultTypeValhall final : public ICLGEMMKernelSelection |
Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 35 | { |
| 36 | public: |
| 37 | /** Constructor |
| 38 | * |
| 39 | * @param[in] gpu GPU target |
| 40 | */ |
SiCong Li | a085a0c | 2020-12-02 14:54:34 +0000 | [diff] [blame] | 41 | CLGEMMDefaultTypeValhall(GPUTarget gpu); |
Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 42 | |
| 43 | // Inherited overridden method |
| 44 | CLGEMMKernelType select_kernel(const CLGEMMKernelSelectionParams ¶ms) override; |
| 45 | |
| 46 | private: |
Gian Marco Iodice | 026d045 | 2020-08-28 13:52:12 +0100 | [diff] [blame] | 47 | CLGEMMKernelType default_f32(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); |
| 48 | CLGEMMKernelType default_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); |
| 49 | CLGEMMKernelType default_q8(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); |
Gian Marco Iodice | 491f30c | 2020-11-02 15:43:57 +0000 | [diff] [blame] | 50 | CLGEMMKernelType g77_f16(unsigned int m, unsigned int n, unsigned int k, unsigned int b, bool is_rhs_constant); |
Gian Marco Iodice | 5a4fe19 | 2020-03-16 12:22:37 +0000 | [diff] [blame] | 51 | }; |
| 52 | } // namespace cl_gemm |
| 53 | } // namespace arm_compute |
SiCong Li | a085a0c | 2020-12-02 14:54:34 +0000 | [diff] [blame] | 54 | #endif /* SRC_CLGEMMDEFAULTTYPEVALHALL_H */ |