aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/CLScheduler.h
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2021-02-05 09:30:57 +0000
committerSiCong Li <sicong.li@arm.com>2021-02-09 11:59:33 +0000
commitdb4a6c15e55aaffbe555c33f3e10795d822701e7 (patch)
tree8c2aeddf0e71a92263735a26c44d0a0377f1381c /arm_compute/runtime/CL/CLScheduler.h
parentf5aad5166e430819ce8592e0e322d084c4b69d91 (diff)
downloadComputeLibrary-db4a6c15e55aaffbe555c33f3e10795d822701e7.tar.gz
Integrate MLGO into CLGEMM and CLGEMMLowpMatrixMultiplyCore: Part2
* Associate CLScheduler with CLGEMMHeuristicsHandle * Add option in arm_compute_validation for mlgo file path * Extend logging for the selection of gemm configurations Resolves: COMPMID-3843, COMPMID-3844 Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I869c3a4122414ae6a7bbd721966c1da37621ca11 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5002 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Manuel Bottini <manuel.bottini@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/CLScheduler.h')
-rw-r--r--arm_compute/runtime/CL/CLScheduler.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/arm_compute/runtime/CL/CLScheduler.h b/arm_compute/runtime/CL/CLScheduler.h
index 8a22832792..d3a91da751 100644
--- a/arm_compute/runtime/CL/CLScheduler.h
+++ b/arm_compute/runtime/CL/CLScheduler.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2020 Arm Limited.
+ * Copyright (c) 2016-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,6 +30,7 @@
#include "arm_compute/core/Error.h"
#include "arm_compute/core/Types.h"
#include "arm_compute/core/experimental/Types.h"
+#include "arm_compute/runtime/CL/CLGEMMHeuristicsHandle.h"
#include "arm_compute/runtime/CL/ICLTuner.h"
namespace arm_compute
@@ -57,15 +58,17 @@ public:
* and sets a default device and kernel path for the @ref CLKernelLibrary.
*
* @param[in] cl_tuner (Optional) Pointer to ICLTuner (default=nullptr)
+ * @param[in] gemm_h (Optional) Pointer to CLGEMMHeuristicsHandle (default = nullptr)
*/
- void default_init(ICLTuner *cl_tuner = nullptr);
+ void default_init(ICLTuner *cl_tuner = nullptr, CLGEMMHeuristicsHandle *gemm_h = nullptr);
/** Initialises the scheduler with context and device provided by the user
*
* @param[in] device OpenCL device to be used
* @param[in] ctx OpenCL ctx to be used
* @param[in] cl_tuner (Optional) Pointer to ICLTuner (default=nullptr)
+ * @param[in] gemm_h (Optional) Pointer to CLGEMMHeuristicsHandle (default = nullptr)
*/
- void default_init_with_context(cl::Device &device, cl::Context &ctx, ICLTuner *cl_tuner = nullptr);
+ void default_init_with_context(cl::Device &device, cl::Context &ctx, ICLTuner *cl_tuner = nullptr, CLGEMMHeuristicsHandle *gemm_h = nullptr);
/** Schedule the execution of the passed kernel if possible.
*
@@ -88,8 +91,9 @@ public:
* @param[in] device A CL device.
* @param[in] cl_tuner (Optional) Pointer to OpenCL tuner (default=nullptr)
* Note: It is caller's responsibility to release the allocated memory for CLTuner
+ * @param[in] gemm_h (Optional) Pointer to CLGEMMHeuristicsHandle (default = nullptr)
*/
- void init(cl::Context context, cl::CommandQueue queue, const cl::Device &device, ICLTuner *cl_tuner = nullptr);
+ void init(cl::Context context, cl::CommandQueue queue, const cl::Device &device, ICLTuner *cl_tuner = nullptr, CLGEMMHeuristicsHandle *gemm_h = nullptr);
/** Accessor for the associated CL context.
*
@@ -109,6 +113,12 @@ public:
*/
GPUTarget target() const;
+ /** Accessor for the associated CLGEMMHeuristicsHandle
+ *
+ * @return Pointer to CLGEMMHeuristicsHandle
+ */
+ CLGEMMHeuristicsHandle *gemm_heuristics() const;
+
/** Accessor to set the CL context to be used by the scheduler.
*
* @param[in] context A CL context.
@@ -161,6 +171,7 @@ private:
bool _is_initialised;
ICLTuner *_cl_tuner;
std::unique_ptr<ICLTuner> _cl_default_static_tuner;
+ CLGEMMHeuristicsHandle *_gemm_heuristics;
};
} // namespace arm_compute
#endif /* ARM_COMPUTE_CLSCHEDULER_H */