diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-03-26 10:31:32 +0000 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-04-08 09:12:09 +0000 |
commit | 11d4918b2321d1e590124f44dd68e6cda223dbdc (patch) | |
tree | 059b20480d2e5e22604cb852e5cb12fc2bfb0afd /arm_compute/core/CL/CLHelpers.h | |
parent | f64d33619827ce6ec9af4566c4743834e521328e (diff) | |
download | ComputeLibrary-11d4918b2321d1e590124f44dd68e6cda223dbdc.tar.gz |
COMPMID-3279: Create CLCompiler interface
Change-Id: Ic9dd5288d72a690651aa03d474f2bfd6e1ebe8b2
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2957
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'arm_compute/core/CL/CLHelpers.h')
-rw-r--r-- | arm_compute/core/CL/CLHelpers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index 453384e14e..ee6397af7a 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -27,11 +27,13 @@ #include "arm_compute/core/CL/CLTypes.h" #include "arm_compute/core/CL/OpenCL.h" +#include <set> #include <string> namespace arm_compute { class CLCoreRuntimeContext; +class CLCompileContext; class CLBuildOptions; enum class DataType; @@ -196,6 +198,16 @@ bool preferred_dummy_work_items_support(const cl::Device &device); */ cl::Kernel create_opencl_kernel(CLCoreRuntimeContext *ctx, const std::string &kernel_name, const CLBuildOptions &build_opts); +/** Creates an opencl kernel using a compile context + * + * @param[in] ctx A compile context to be used to create the opencl kernel. + * @param[in] kernel_name The kernel name. + * @param[in] build_opts The build options to be used for the opencl kernel compilation. + * + * @return An opencl kernel + */ +cl::Kernel create_kernel(CLCompileContext &ctx, const std::string &kernel_name, const std::set<std::string> &build_opts); + /** Creates a suitable LWS hint object for parallel implementations. Sets the number of WG based on the input size. * If input width is smaller than 128 we can use fewer threads than 8. * |