From 500e10b3222e726cfc5d484f924d5eb98016a754 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Tue, 12 Sep 2023 17:49:38 +0100 Subject: Add CL command buffer class * Two implementations of the command buffer are added: - CLMutableCommandBuffer uses mutable dispatch command buffer extension. - CLCompatCommandBuffer is the compatibility class for platform without the CL extension. Resolves: COMPMID-6454 Signed-off-by: Viet-Hoa Do Change-Id: I15b370a50168ca940bd8fb2b5fae26230da3f472 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10298 Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/CLUtils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/CL/CLUtils.h') diff --git a/src/core/CL/CLUtils.h b/src/core/CL/CLUtils.h index f0e79bccfc..de9c1b3194 100644 --- a/src/core/CL/CLUtils.h +++ b/src/core/CL/CLUtils.h @@ -73,6 +73,14 @@ cl::Image2D create_image2d_from_tensor(const ICLTensor *tensor, CLImage2DType im * @return cl::Image2D object */ cl::Image2D create_image2d_from_buffer(const cl::Context &ctx, const cl::Buffer &buffer, const TensorShape &shape2d, DataType data_type, size_t image_row_pitch, CLImage2DType image_type); + +/** Check for CL error code and throw exception accordingly. + * + * @param[in] function_name The name of the CL function being called. + * @param[in] error_code The error returned by the CL function. + */ +void handle_cl_error(const std::string &function_name, cl_int error_code); + } // namespace arm_compute #endif // ACL_SRC_CORE_CL_CLUTILS_H -- cgit v1.2.1