24.02.1
|
Go to the documentation of this file.
46 bool rhs_lock_padding)
49 "The fallback MatMul configuration cannot have export_to_cl_image = true");
51 "The MatMul configurations must have the same adj_lhs value");
53 "The MatMul configurations must have the same adj_rhs value");
55 const bool adj_lhs = info0.
adj_lhs;
56 const bool adj_rhs = info0.
adj_rhs;
64 if (rhs_lock_padding ==
false)
89 size_t min_acc = std::numeric_limits<size_t>::max();
93 const size_t num_rows = configs.size();
94 const size_t num_cols = configs[0].size();
97 "The entry should have 8 integer values representing: M, N, K, B, M0, N0. K0, IMG_RHS");
102 for (
size_t y = 0; y < num_rows; ++y)
104 size_t mc0 =
static_cast<size_t>(configs[y][0]);
105 size_t nc0 =
static_cast<size_t>(configs[y][1]);
106 size_t kc0 =
static_cast<size_t>(configs[y][2]);
107 size_t bc0 =
static_cast<size_t>(configs[y][3]);
110 acc += (m - mc0) * (m - mc0);
111 acc += (n - nc0) * (n - nc0);
112 acc += (k - kc0) * (k - kc0);
113 acc += (
b - bc0) * (
b - bc0);
114 acc = std::sqrt(acc);
126 desc.
m0 = configs[min_idx][4];
127 desc.
n0 = configs[min_idx][5];
128 desc.
k0 = configs[min_idx][6];
bool adj_rhs
Get Adjoint RHS flag value.
MatMulKernelInfo select_info(const MatMulKernelInfo &info0, const MatMulKernelInfo &info1, unsigned int m, unsigned int n, unsigned int k, unsigned int b, DataType data_type, bool rhs_lock_padding)
This function accepts two MatMulKernelInfo objects where only the first can be with cl_image2d suppor...
int m0
Number of output rows processed by each work-item.
int k0
Number of inner accumulations.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
static Status validate(const ITensorInfo *lhs, const ITensorInfo *rhs, const ITensorInfo *bias, const ITensorInfo *dst, const MatMulKernelInfo &matmul_kernel_info, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration.
std::vector< std::vector< int32_t > > MatMulNativeConfigsMatrix
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
bool adj_lhs
Get Adjoint LHS flag value.
Store the tensor's metadata.
Copyright (c) 2017-2024 Arm Limited.
bool export_rhs_to_cl_image
Flag to know whether the RHS tensor should be exported to cl_image.
int n0
Number of output columns processed by each work-item.
MatMulKernelInfo find_info(const MatMulNativeConfigsMatrix &configs, bool adj_lhs, bool adj_rhs, unsigned int m, unsigned int n, unsigned int k, unsigned int b)
Find the preferred configurations for the MatMul Native kernel using the MatMulNativeConfigsMatrix pr...
DataType
Available data types.