24.04
|
Go to the documentation of this file.
43 const size_t lhs_k = matmul_kernel_info.
adj_lhs ? lhs_shape.
y() : lhs_shape.
x();
44 const size_t rhs_k = matmul_kernel_info.
adj_rhs ? rhs_shape.
x() : rhs_shape.
y();
50 constexpr
size_t batch_dim_start = 2;
78 const int m =
dst->dimension(1);
79 const int n =
dst->dimension(0);
81 const int m0 = std::min(matmul_kernel_info.
m0, m);
89 const unsigned int n_div_n0 = ceil_to_multiple_n_n0 / n0;
90 const unsigned int m_div_m0 = ceil_to_multiple_m_m0 / m0;
93 const unsigned int ceil_to_multiple_n_div_n0_mmul_n0 =
ceil_to_multiple(n_div_n0, mmul_n0);
94 const unsigned int ceil_to_multiple_m_div_m0_mmul_m0 =
ceil_to_multiple(m_div_m0, mmul_m0);
97 x_dimension.
set_end(ceil_to_multiple_n_div_n0_mmul_n0 * mmul_m0);
98 y_dimension.
set_end(ceil_to_multiple_m_div_m0_mmul_m0 / mmul_m0);
103 return std::make_pair(
Status{}, collapsed);
Class to describe a number of elements in each dimension.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
bool adj_rhs
Get Adjoint RHS flag value.
void set_end(int end)
Set the dimension's end.
int m0
Number of output rows processed by each work-item.
Status validate_matmul_input_shapes(const TensorShape &lhs_shape, const TensorShape &rhs_shape, const MatMulKernelInfo &matmul_kernel_info)
Validate the input shapes of Matmul operation.
Window collapse(const Window &full_window, size_t first, size_t last=Coordinates::num_max_dimensions) const
Collapse the dimensions between first and last.
size_t total_size() const
Collapses all dimensions to a single linear total size.
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
T x() const
Alias to access the size of the first dimension.
std::pair< Status, Window > validate_and_configure_window_for_mmul_kernels(const ITensorInfo *lhs, const ITensorInfo *rhs, const ITensorInfo *dst, const MatMulKernelInfo &matmul_kernel_info, int mmul_m0, int mmul_n0)
Validate and configure window for Matmul MMUL kernels.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Describe one of the image's dimensions with a start, end and step.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
auto ceil_to_multiple(S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor)
Computes the smallest number larger or equal to value that is a multiple of divisor.
bool adj_lhs
Get Adjoint LHS flag value.
Describe a multidimensional execution window.
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Copyright (c) 2017-2024 Arm Limited.
unsigned int adjust_vec_size(unsigned int vec_size, size_t dim0)
Returns the adjusted vector size in case it is less than the input's first dimension,...
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Store the tensor's metadata.
T y() const
Alias to access the size of the second dimension.
int n0
Number of output columns processed by each work-item.
constexpr const Dimension & x() const
Alias to access the first dimension of the window.
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.