diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-09-12 17:49:38 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-09-18 17:12:18 +0000 |
commit | 500e10b3222e726cfc5d484f924d5eb98016a754 (patch) | |
tree | 680a92198b5b85bf833e5654798986f3fdffaa2e /src/core/CL/CLUtils.cpp | |
parent | 532ce2c84dd24cb0c5064a3d2e5c7b4094df0e01 (diff) | |
download | ComputeLibrary-500e10b3222e726cfc5d484f924d5eb98016a754.tar.gz |
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 <viet-hoa.do@arm.com>
Change-Id: I15b370a50168ca940bd8fb2b5fae26230da3f472
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10298
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/CLUtils.cpp')
-rw-r--r-- | src/core/CL/CLUtils.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/CL/CLUtils.cpp b/src/core/CL/CLUtils.cpp index 7e56a3ba18..289300b3a1 100644 --- a/src/core/CL/CLUtils.cpp +++ b/src/core/CL/CLUtils.cpp @@ -111,4 +111,14 @@ cl::Image2D create_image2d_from_buffer(const cl::Context &ctx, const cl::Buffer return cl::Image2D(cl_image); } + +void handle_cl_error(const std::string &function_name, cl_int error_code) +{ + if(error_code != CL_SUCCESS) + { + std::string error_message = function_name + " - Error code: " + std::to_string(error_code); + ARM_COMPUTE_ERROR(error_message.c_str()); + } +} + } // namespace arm_compute |