45 using ConfigurationFunctionExecutorPtr = std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> (
CLGEMMDefaultConfigNativeValhall::*)(
unsigned int m,
unsigned int n,
unsigned int k,
49 static std::map<DataType, ConfigurationFunctionExecutorPtr> gemm_configs_G77 =
51 {
DataType::F32, &CLGEMMDefaultConfigNativeValhall::configure_G77_f32 },
52 {
DataType::F16, &CLGEMMDefaultConfigNativeValhall::configure_G77_f16 },
63 if(gemm_configs_G77.find(data_type) != gemm_configs_G77.end())
65 return (this->*gemm_configs_G77[data_type])(m, n, k,
b);
74 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_f32(
unsigned int m,
unsigned int n,
unsigned int k,
unsigned int b)
83 return configure_lhs_rhs_info(m, n, 1, 2, 4, 1, 1,
false,
false,
false,
false);
85 else if(n >= 2048 && n < 8192)
87 return configure_lhs_rhs_info(m, n, 1, 4, 4, 1, 1,
false,
false,
false,
false);
91 return configure_lhs_rhs_info(m, n, 1, 8, 4, 1, 1,
false,
false,
false,
false);
96 return configure_lhs_rhs_info(m, n, 5, 4, 2, 1, 1,
false,
false,
false,
false);
100 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_f16(
unsigned int m,
unsigned int n,
unsigned int k,
unsigned int b)
109 return configure_lhs_rhs_info(m, n, 1, 2, 4, 1, 1,
false,
false,
false,
false);
111 else if(n >= 2048 && n < 8192)
113 return configure_lhs_rhs_info(m, n, 1, 4, 4, 1, 1,
false,
false,
false,
false);
117 return configure_lhs_rhs_info(m, n, 1, 8, 4, 1, 1,
false,
false,
false,
false);
122 return configure_lhs_rhs_info(m, n, 4, 8, 2, 1, 1,
false,
false,
false,
false);
126 std::pair<GEMMLHSMatrixInfo, GEMMRHSMatrixInfo> CLGEMMDefaultConfigNativeValhall::configure_G77_u8(
unsigned int m,
unsigned int n,
unsigned int k,
unsigned int b)
137 return configure_lhs_rhs_info(m, n, 1, 2, 16, 1, 1,
false,
false,
false,
false);
139 else if(n >= 2048 && n < 16384)
141 return configure_lhs_rhs_info(m, n, 1, 4, 16, 1, 1,
false,
false,
false,
false);
145 return configure_lhs_rhs_info(m, n, 1, 8, 16, 1, 1,
false,
false,
false,
false);
152 return configure_lhs_rhs_info(m, n, 2, 2, 16, 1, 1,
false,
false,
false,
false);
156 return configure_lhs_rhs_info(m, n, 5, 2, 16, 1, 1,
false,
false,
false,
false);
166 return configure_lhs_rhs_info(m, n, 1, 4, 16, 1, 1,
false,
false,
false,
false);
170 return configure_lhs_rhs_info(m, n, 1, 8, 16, 1, 1,
false,
false,
false,
false);
175 return configure_lhs_rhs_info(m, n, 2, 8, 16, 1, 1,
false,
false,
false,
false);
Basic interface for the GEMM kernel configuration.
bool dot8_supported(const cl::Device &device)
Helper function to check whether the cl_arm_integer_dot_product_int8 extension is supported...
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
1 channel, 1 F32 per channel
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
CLGEMMDefaultConfigNativeValhall(GPUTarget gpu)
Constructor.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
quantized, asymmetric fixed-point 8-bit number unsigned
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > configure(unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type) override
Given M, N, K and B, this method returns the GEMMLHSMatrixInfo and GEMMRHSMatrixInfo to be used...
quantized, symmetric fixed-point 8-bit number
quantized, symmetric per channel fixed-point 8-bit number
GPUTarget
Available GPU Targets.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
std::pair< GEMMLHSMatrixInfo, GEMMRHSMatrixInfo > configure_lhs_rhs_info(unsigned int m, unsigned int n, unsigned int m0, unsigned int n0, unsigned int k0, unsigned int v0, unsigned int h0, bool lhs_interleave, bool rhs_interleave, bool lhs_transpose, bool rhs_transpose, bool export_to_cl_image)
Configure GEMMLHSMatrixInfo and GEMMRHSMatrixInfo.
quantized, asymmetric fixed-point 8-bit number signed
DataType
Available data types.