From 908f6163155e07e0c2e58c4d05389e0c68122e45 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 4 May 2021 10:11:09 +0100 Subject: Creates ClKerneLibrary to serve just as a kernel container without build logic Moves all the kernels out of the legacy CLKernelLibrary into a separate class that its planned responsibility is to only handle the kernel strings. Currently CLKernelLibrary mixes kernel inventory and building logic, thus coupling multiple responsibilities. By separating compilation logic, the kernel library removes any dependencies from the OpenCL and simplifies maintainance but also increases flexibility. Signed-off-by: Georgios Pinitas Change-Id: Idcd491783b5a413bd944d385956075ead0204362 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5572 Reviewed-by: Michele Di Giorgio Reviewed-by: Aleksandr Nikolaev Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- arm_compute/core/CL/CLHelpers.h | 11 ----------- arm_compute/core/CL/CLKernelLibrary.h | 7 +------ 2 files changed, 1 insertion(+), 17 deletions(-) (limited to 'arm_compute') diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index 03f956f6f8..a9ac6a5933 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -38,7 +38,6 @@ namespace arm_compute { -class CLCoreRuntimeContext; class CLCompileContext; class CLBuildOptions; @@ -202,16 +201,6 @@ bool preferred_dummy_work_items_support(const cl::Device &device); */ bool image2d_from_buffer_supported(const cl::Device &device); -/** Creates an opencl kernel - * - * @param[in] ctx A 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_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. diff --git a/arm_compute/core/CL/CLKernelLibrary.h b/arm_compute/core/CL/CLKernelLibrary.h index 24eef639ae..527733ccf1 100644 --- a/arm_compute/core/CL/CLKernelLibrary.h +++ b/arm_compute/core/CL/CLKernelLibrary.h @@ -170,12 +170,7 @@ public: CLCompileContext &get_compile_context(); private: - CLCompileContext _compile_context; /**< Compile Context. */ - std::string _kernel_path; /**< Path to the kernels folder. */ - mutable std::map _decompressed_source_map; /**< Map holding the decompressed files when compression is used */ - static const std::map _kernel_program_map; /**< Map that associates kernel names with programs. */ - static const std::map _program_source_map; /**< Contains sources for all programs. - Used for compile-time kernel inclusion. >*/ + CLCompileContext _compile_context; /**< Compile Context. */ }; } // namespace arm_compute #endif /* ARM_COMPUTE_CLKERNELLIBRARY_H */ -- cgit v1.2.1