44 namespace auto_heuristics
52 if(mlgo_heuristics !=
nullptr)
77 params.is_rhs_constant = reshape_b_only_on_first_run;
80 const auto kernel_type = default_heuristics->select_kernel(params);
90 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
101 if(mlgo_heuristics !=
nullptr)
109 std::tie(lhs_info, rhs_info) =
configure_lhs_rhs_info(query.
m, query.
n, config.m0, config.n0, config.k0, 1, config.h0,
false, config.interleave_rhs, !config.transpose_rhs, config.transpose_rhs,
110 config.export_cl_image);
125 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
136 if(mlgo_heuristics !=
nullptr)
143 std::tie(lhs_info, rhs_info) =
configure_lhs_rhs_info(query.
m, query.
n, config.m0, config.n0, config.k0, config.v0, config.h0, config.interleave_lhs, config.interleave_rhs, !config.transpose_rhs,
144 config.transpose_rhs, config.export_cl_image);
159 std::tie(lhs_info, rhs_info) = gemm_config->configure(query.
m, query.
n, query.
k, query.
b, query.
data_type);
170 if(mlgo_heuristics !=
nullptr)
178 std::tie(lhs_info, rhs_info) =
configure_lhs_rhs_info(query.
m, query.
n, config.m0, config.n0, config.k0, 1, 1,
false,
false,
false,
false,
false);
unsigned int m
Number of rows for the lhs matrix.
GEMMConfigResult select_default_gemm_config_reshaped(const CommonQuery &query)
Select gemm config based on default heuristics.
DataType data_type
Data type.
OpenCL GEMM kernel selection parameters.
static std::unique_ptr< ICLGEMMKernelConfiguration > create(GPUTarget gpu)
Static method to call the CLGEMMReshaped kernel configuration class accordingly with the GPU target.
static CLScheduler & get()
Access the scheduler singleton.
GEMM Configuration for Reshaped kernel.
unsigned int b
Batch size.
A collection of adaptor functions that enable the auto selection between mlgo-based heuristics and de...
GEMMType gemm_type(TokenStream &in, bool &valid)
GEMM LHS (Left Hand Side) matrix information.
Result of querying about GEMM config ( GEMMLHSMatrixInfo and GEMMRHSMatrixInfo)
const std::string & string_from_target(GPUTarget target)
Translates a given gpu device target to string.
GEMMConfigResult select_mlgo_gemm_config_native(const CommonQuery &query)
Select gemm config based on mlgo heuristics.
CLGEMMKernelType
OpenCL GEMM kernel types.
CLGEMMHeuristicsHandle * gemm_heuristics() const
Accessor for the associated CLGEMMHeuristicsHandle.
std::pair< bool, GEMMType > query_gemm_type(const Query &query) const
Query the gemm type.
Copyright (c) 2017-2021 Arm Limited.
GEMMConfigResult select_mlgo_gemm_config_reshaped(const CommonQuery &query)
Select gemm config based on mlgo heuristics.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
GEMMConfigResult select_default_gemm_config_native(const CommonQuery &query)
Select gemm config based on default heuristics.
std::string to_string(const ROIPoolingLayerInfo &pool_info)
Formatted output of the ROIPoolingInfo type.
#define ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE(fmt,...)
Log information level formatted message to the core system logger.
const mlgo::MLGOHeuristics * get() const
Return a pointer to underlying heuristics for querying purposes.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
static std::unique_ptr< ICLGEMMKernelConfiguration > create(GPUTarget gpu)
Static method to construct CLGEMMNative kernel object accordingly with the GPU target.
GEMM RHS (Right Hand Side) matrix information.
static std::unique_ptr< ICLGEMMKernelConfiguration > create(GPUTarget gpu)
Static method to call the CLGEMMReshapedOnlyRHS kernel configuration class accordingly with the GPU t...
GEMM Configuration for Reshaped Only RHS kernel.
GEMMTypeResult select_default_gemm_kernel(const CommonQuery &query, bool reshape_b_only_on_first_run)
Select gemm type based on default heuristics.
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 k
Number of rows for the rhs matrix.
GPUTarget gpu_target
Which GPUTarget to query about.
std::pair< bool, GEMMConfigReshapedOnlyRHS > query_gemm_config_reshaped_only_rhs(const Query &query) const
Query the gemm configuration for reshaped only rhs kernel.
std::pair< bool, GEMMConfigNative > query_gemm_config_native(const Query &query) const
Query the gemm configuration for native kernel.
GEMMTypeResult select_mlgo_gemm_kernel(const CommonQuery &query, bool reshape_b_only_on_first_run)
Select gemm type based on mlgo heuristics.
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.
unsigned int m
Number of rows for the lhs matrix.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
#define ARM_COMPUTE_LOG_INFO_MSG_CORE(msg)
Log information level message to the core system logger.
GEMM Configuration for Native kernel.
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.
Result of querying about GEMM type ( CLGEMMKernelType)
GEMMConfigResult select_default_gemm_config_reshaped_only_rhs(const CommonQuery &query)
Select gemm config based on default heuristics.
std::pair< bool, GEMMConfigReshaped > query_gemm_config_reshaped(const Query &query) const
Query the gemm configuration for reshaped kernel.