21.02
|
MLGOHeuristics for configuring GEMM kernels. More...
#include <MLGOHeuristics.h>
Public Member Functions | |
MLGOHeuristics () | |
Constructor. More... | |
~MLGOHeuristics ()=default | |
Default Destructor. More... | |
MLGOHeuristics (const MLGOHeuristics &)=delete | |
Prevent Copy Construct. More... | |
MLGOHeuristics & | operator= (const MLGOHeuristics &)=delete |
Prevent Copy Assignment. More... | |
MLGOHeuristics (MLGOHeuristics &&)=default | |
Default Move Constructor. More... | |
MLGOHeuristics & | operator= (MLGOHeuristics &&)=default |
Default Move Assignment. More... | |
std::pair< bool, GEMMType > | query_gemm_type (const Query &query) const |
Query the gemm type. More... | |
std::pair< bool, GEMMConfigNative > | query_gemm_config_native (const Query &query) const |
Query the gemm configuration for native kernel. More... | |
std::pair< bool, GEMMConfigReshapedOnlyRHS > | query_gemm_config_reshaped_only_rhs (const Query &query) const |
Query the gemm configuration for reshaped only rhs kernel. More... | |
std::pair< bool, GEMMConfigReshaped > | query_gemm_config_reshaped (const Query &query) const |
Query the gemm configuration for reshaped kernel. More... | |
bool | reload_from_file (const std::string &filename) |
(Re)Load the heuristics from reading a dotmlgo file More... | |
bool | reload_from_stream (std::istream &istream) |
(Re)Load the heuristics from reading an input stream More... | |
std::pair< bool, HeuristicTree * > | get_heuristic_tree (HeuristicTree::TreeID id) |
Get the heuristic tree from tree id. More... | |
bool | add_heuristic_tree (HeuristicTree &&t) |
Add a heuristic tree. More... | |
bool | check_heuristic_tree (HeuristicTree::TreeID id) |
Check the validity of the heuristic tree. More... | |
bool | check_all () const |
Check the overall validity of the heuristics. More... | |
MLGOHeuristics for configuring GEMM kernels.
Definition at line 54 of file MLGOHeuristics.h.
MLGOHeuristics | ( | ) |
Constructor.
Definition at line 53 of file MLGOHeuristics.cpp.
|
default |
Default Destructor.
|
delete |
Prevent Copy Construct.
|
default |
Default Move Constructor.
bool add_heuristic_tree | ( | HeuristicTree && | t | ) |
Add a heuristic tree.
t | Heuristic tree to be added |
Definition at line 187 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, and tf_frozen_model_extractor::t.
Referenced by arm_compute::mlgo::parser::heuristics_table_entry().
bool check_all | ( | ) | const |
Check the overall validity of the heuristics.
Definition at line 149 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE.
Referenced by arm_compute::mlgo::parser::mlgo().
bool check_heuristic_tree | ( | HeuristicTree::TreeID | id | ) |
Check the validity of the heuristic tree.
id | ID of the tree to be checked |
Definition at line 131 of file MLGOHeuristics.cpp.
References MLGOHeuristics::get_heuristic_tree().
Referenced by arm_compute::mlgo::parser::heuristic_tree().
std::pair< bool, HeuristicTree * > get_heuristic_tree | ( | HeuristicTree::TreeID | id | ) |
Get the heuristic tree from tree id.
[in] | id | Tree id. |
Definition at line 168 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, and tf_frozen_model_extractor::t.
Referenced by MLGOHeuristics::check_heuristic_tree(), and arm_compute::mlgo::parser::heuristic_tree().
|
delete |
Prevent Copy Assignment.
|
default |
Default Move Assignment.
std::pair< bool, GEMMConfigNative > query_gemm_config_native | ( | const Query & | query | ) | const |
Query the gemm configuration for native kernel.
[in] | query | Query |
Definition at line 76 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, Query::b, Query::data_type, arm_compute::mlgo::GEMM_Config_Native, Query::ip_target, Query::k, Query::m, Query::n, and arm_compute::mlgo::to_string().
Referenced by arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_native().
std::pair< bool, GEMMConfigReshaped > query_gemm_config_reshaped | ( | const Query & | query | ) | const |
Query the gemm configuration for reshaped kernel.
[in] | query | Query |
Definition at line 112 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, Query::b, Query::data_type, arm_compute::mlgo::GEMM_Config_Reshaped, Query::ip_target, Query::k, Query::m, Query::n, and arm_compute::mlgo::to_string().
Referenced by arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_reshaped(), and arm_compute::test::validation::TEST_CASE().
std::pair< bool, GEMMConfigReshapedOnlyRHS > query_gemm_config_reshaped_only_rhs | ( | const Query & | query | ) | const |
Query the gemm configuration for reshaped only rhs kernel.
[in] | query | Query |
Definition at line 94 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, Query::b, Query::data_type, arm_compute::mlgo::GEMM_Config_Reshaped_Only_RHS, Query::ip_target, Query::k, Query::m, Query::n, and arm_compute::mlgo::to_string().
Referenced by arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_config_reshaped_only_rhs(), and arm_compute::test::validation::TEST_CASE().
Query the gemm type.
[in] | query | Query |
Definition at line 58 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, Query::b, Query::data_type, arm_compute::mlgo::GEMM_Type, Query::ip_target, Query::k, Query::m, Query::n, arm_compute::RESHAPED, and arm_compute::mlgo::to_string().
Referenced by arm_compute::cl_gemm::auto_heuristics::select_mlgo_gemm_kernel(), and arm_compute::test::validation::TEST_CASE().
bool reload_from_file | ( | const std::string & | filename | ) |
(Re)Load the heuristics from reading a dotmlgo file
[in] | filename | Path to the dotmlgo file |
Definition at line 217 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_WITH_FORMAT_CORE, and MLGOHeuristics::reload_from_stream().
bool reload_from_stream | ( | std::istream & | istream | ) |
(Re)Load the heuristics from reading an input stream
[in] | istream | Istream containing mlgo heuristics |
Definition at line 230 of file MLGOHeuristics.cpp.
References ARM_COMPUTE_LOG_INFO_MSG_CORE, and arm_compute::mlgo::parser::parse_mlgo().
Referenced by MLGOHeuristics::reload_from_file(), and arm_compute::test::validation::TEST_CASE().