diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-05-04 10:11:09 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-05-05 17:39:44 +0000 |
commit | 908f6163155e07e0c2e58c4d05389e0c68122e45 (patch) | |
tree | 74cf6a57b3569bf055f9a852a0ebaa2b33e2bcbc /arm_compute | |
parent | ef516e8bb8eb7f55b410268587f3b88b77e2fd8e (diff) | |
download | ComputeLibrary-908f6163155e07e0c2e58c4d05389e0c68122e45.tar.gz |
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 <georgios.pinitas@arm.com>
Change-Id: Idcd491783b5a413bd944d385956075ead0204362
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5572
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Aleksandr Nikolaev <aleksandr.nikolaev@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/CLHelpers.h | 11 | ||||
-rw-r--r-- | arm_compute/core/CL/CLKernelLibrary.h | 7 |
2 files changed, 1 insertions, 17 deletions
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<std::string, std::string> _decompressed_source_map; /**< Map holding the decompressed files when compression is used */ - static const std::map<std::string, std::string> _kernel_program_map; /**< Map that associates kernel names with programs. */ - static const std::map<std::string, std::string> _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 */ |