diff options
author | SiCong Li <sicong.li@arm.com> | 2021-02-05 09:19:51 +0000 |
---|---|---|
committer | SiCong Li <sicong.li@arm.com> | 2021-02-09 09:47:22 +0000 |
commit | 70858d8eb178532b0e728e6a7d09a77d27605020 (patch) | |
tree | 7eb80b2d8febd955908286b2279621ae86157520 /src/runtime/CL/mlgo/MLGOHeuristics.h | |
parent | 8e2133152285a80d2997ab21f6a3397f7c60a929 (diff) | |
download | ComputeLibrary-70858d8eb178532b0e728e6a7d09a77d27605020.tar.gz |
Integrate MLGO into CLGEMM and CLGEMMLowpMatrixMultiplyCore: Part1
* Create a new public handle class CLGEMMHeuristicsHandle
It is responsible for the loading and lifetime management of the
underlying heuristics
* Add to_string utility to several mlgo constructs for logging
Resolves: COMPMID-3843, COMPMID-3844
Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: Ib9c65e076daa6a9a204999cde9abf366dbabc496
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5001
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/mlgo/MLGOHeuristics.h')
-rw-r--r-- | src/runtime/CL/mlgo/MLGOHeuristics.h | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/runtime/CL/mlgo/MLGOHeuristics.h b/src/runtime/CL/mlgo/MLGOHeuristics.h index 02e8111b6e..aa21225959 100644 --- a/src/runtime/CL/mlgo/MLGOHeuristics.h +++ b/src/runtime/CL/mlgo/MLGOHeuristics.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef SRC_RUNTIME_MLGO_MLGOHEURISTICS_H -#define SRC_RUNTIME_MLGO_MLGOHEURISTICS_H +#ifndef SRC_RUNTIME_CL_MLGO_MLGO_HEURISTICS_H +#define SRC_RUNTIME_CL_MLGO_MLGO_HEURISTICS_H #include "src/runtime/CL/mlgo/Common.h" #include "src/runtime/CL/mlgo/HeuristicTree.h" @@ -46,6 +46,7 @@ struct Query unsigned int b; /**< Batch size */ }; +bool operator==(const GEMMConfigNative &lhs, const GEMMConfigNative &rhs); bool operator==(const GEMMConfigReshapedOnlyRHS &lhs, const GEMMConfigReshapedOnlyRHS &rhs); bool operator==(const GEMMConfigReshaped &lhs, const GEMMConfigReshaped &rhs); @@ -55,34 +56,44 @@ class MLGOHeuristics public: /** Constructor */ MLGOHeuristics(); + /** Default Destructor */ + ~MLGOHeuristics() = default; + /** Prevent Copy Construct */ + MLGOHeuristics(const MLGOHeuristics &) = delete; + /** Prevent Copy Assignment */ + MLGOHeuristics &operator=(const MLGOHeuristics &) = delete; + /** Default Move Constructor */ + MLGOHeuristics(MLGOHeuristics &&) = default; + /** Default Move Assignment */ + MLGOHeuristics &operator=(MLGOHeuristics &&) = default; /** Query the gemm type * * @param[in] query Query * * @return std::pair<bool, GEMMType> signals if the query succeeded or failed */ - std::pair<bool, GEMMType> query_gemm_type(Query) const; + std::pair<bool, GEMMType> query_gemm_type(const Query &query) const; /** Query the gemm configuration for native kernel * * @param[in] query Query * * @return std::pair<bool, GEMMConfigNative> bool signals if the query succeeded or failed */ - std::pair<bool, GEMMConfigNative> query_gemm_config_native(Query query) const; + std::pair<bool, GEMMConfigNative> query_gemm_config_native(const Query &query) const; /** Query the gemm configuration for reshaped only rhs kernel * * @param[in] query Query * * @return std::pair<bool, GEMMConfigReshapedOnlyRHS> bool signals if the query succeeded or failed */ - std::pair<bool, GEMMConfigReshapedOnlyRHS> query_gemm_config_reshaped_only_rhs(Query) const; + std::pair<bool, GEMMConfigReshapedOnlyRHS> query_gemm_config_reshaped_only_rhs(const Query &query) const; /** Query the gemm configuration for reshaped kernel * * @param[in] query Query * * @return std::pair<bool, GEMMConfigReshaped> bool signals if the query succeeded or failed */ - std::pair<bool, GEMMConfigReshaped> query_gemm_config_reshaped(Query) const; + std::pair<bool, GEMMConfigReshaped> query_gemm_config_reshaped(const Query &query) const; /** (Re)Load the heuristics from reading a dotmlgo file * * @param[in] filename Path to the dotmlgo file @@ -136,4 +147,4 @@ private: } // namespace mlgo } // namespace arm_compute -#endif //SRC_MLGO_MLGOHEURISTICS_H
\ No newline at end of file +#endif //SRC_RUNTIME_CL_MLGO_MLGO_HEURISTICS_H
\ No newline at end of file |