23.11
|
Go to the documentation of this file.
45 namespace auto_heuristics
55 if (mlgo_heuristics !=
nullptr)
85 const auto kernel_type = default_heuristics->select_kernel(params);
93 std::unique_ptr<IClGemmKernelConfig> gemm_config =
96 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
107 if (mlgo_heuristics !=
nullptr)
118 query.
m, query.
n, config.m0, config.n0, config.k0, 1, config.h0,
false, config.interleave_rhs,
119 !config.transpose_rhs, config.transpose_rhs, config.export_cl_image);
132 std::unique_ptr<IClGemmKernelConfig> gemm_config =
135 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
146 if (mlgo_heuristics !=
nullptr)
156 query.
m, query.
n, config.m0, config.n0, config.k0, config.v0, config.h0, config.interleave_lhs,
157 config.interleave_rhs, !config.transpose_rhs, config.transpose_rhs, config.export_cl_image);
172 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
183 if (mlgo_heuristics !=
nullptr)
194 query.
m, query.
n, config.m0, config.n0, config.k0, 1, 1,
false,
false,
false,
false,
false);
CLGEMMHeuristicsHandle * gemm_heuristics() const
Accessor for the associated CLGEMMHeuristicsHandle.
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.
Result of querying about GEMM config ( GEMMLHSMatrixInfo and GEMMRHSMatrixInfo)
OpenCL GEMM kernel selection parameters.
DataType data_type
Data type.
GEMMTypeResult select_mlgo_gemm_kernel(const CommonQuery &query, bool reshape_b_only_on_first_run)
Select gemm type based on mlgo heuristics.
GEMMConfigResult select_mlgo_gemm_config_reshaped_only_rhs(const CommonQuery &query)
Select gemm config based on mlgo heuristics.
unsigned int n
Number of columns for the rhs matrix.
std::pair< bool, GEMMType > query_gemm_type(const Query &query) const
Query the gemm type.
unsigned int m
Number of rows for the lhs matrix.
#define ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE(fmt,...)
Log information level formatted message to the core system logger.
bool is_rhs_constant
True if the content of the rhs matrix is constant.
CLGEMMKernelType
OpenCL GEMM kernel types.
const std::string & string_from_target(GPUTarget target)
Translates a given gpu device target to string.
Result of querying about GEMM type ( CLGEMMKernelType)
GEMM Configuration for Reshaped Only RHS kernel.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
A collection of adaptor functions that enable the auto selection between mlgo-based heuristics and de...
GEMMConfigResult select_default_gemm_config_reshaped_only_rhs(const CommonQuery &query)
Select gemm config based on default heuristics.
GEMMConfigResult select_default_gemm_config_reshaped(const CommonQuery &query)
Select gemm config based on default heuristics.
GEMMType gemm_type(TokenStream &in, bool &valid)
GEMM Configuration for Reshaped kernel.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
unsigned int n
Number of columns for the rhs matrix.
unsigned int k
Number of rows for the rhs matrix.
unsigned int b
Batch size.
static std::unique_ptr< IClGemmKernelConfig > create(GPUTarget gpu)
Static method to construct CLGEMMNative kernel object accordingly with the GPU target.
std::pair< bool, GEMMConfigReshapedOnlyRHS > query_gemm_config_reshaped_only_rhs(const Query &query) const
Query the gemm configuration for reshaped only rhs kernel.
static std::unique_ptr< IClGemmKernelConfig > create(GPUTarget gpu)
Static method to call the CLGEMMReshapedOnlyRHS kernel configuration class accordingly with the GPU t...
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
static std::unique_ptr< IClGemmKernelConfig > create(GPUTarget gpu)
Static method to call the CLGEMMReshaped kernel configuration class accordingly with the GPU target.
static std::unique_ptr< ICLGEMMKernelSelection > create(GPUTarget gpu)
Static method to select the GEMM kernel accordingly with the GPU target and GEMM's dimensionality.
unsigned int m
Number of rows for the lhs matrix.
static CLScheduler & get()
Access the scheduler singleton.
GPUTarget gpu_target
Which GPUTarget to query about.
GEMMConfigResult select_mlgo_gemm_config_reshaped(const CommonQuery &query)
Select gemm config based on mlgo heuristics.
GEMM LHS (Left Hand Side) matrix information.
#define ARM_COMPUTE_LOG_INFO_MSG_CORE(msg)
Log information level message to the core system logger.
unsigned int k
Number of rows for the rhs matrix.
unsigned int b
Batch size.
Copyright (c) 2017-2023 Arm Limited.
std::string to_string(const ClComponentElementwiseBinary::Attributes::ElementwiseOp &op)
Formatted output of the arm_compute::experimental::dynamic_fusion::ClComponentElementwiseBinary::Attr...
std::pair< bool, GEMMConfigReshaped > query_gemm_config_reshaped(const Query &query) const
Query the gemm configuration for reshaped kernel.
GEMM Configuration for Native kernel.
GEMMConfigResult select_default_gemm_config_native(const CommonQuery &query)
Select gemm config based on default heuristics.
std::pair< bool, GEMMConfigNative > query_gemm_config_native(const Query &query) const
Query the gemm configuration for native kernel.
GEMMTypeResult select_default_gemm_kernel(const CommonQuery &query, bool reshape_b_only_on_first_run)
Select gemm type based on default heuristics.
DataType data_type
Data type.
GEMM RHS (Right Hand Side) matrix information.
const mlgo::MLGOHeuristics * get() const
Return a pointer to underlying heuristics for querying purposes.
GEMMConfigResult select_mlgo_gemm_config_native(const CommonQuery &query)
Select gemm config based on mlgo heuristics.