From 48b6d17f8958c5bc9fa715853d227e430e3547e8 Mon Sep 17 00:00:00 2001 From: Viet-Hoa Do Date: Fri, 11 Aug 2023 17:48:54 +0100 Subject: Check CL command buffer extension * Add helper functions to check whether command buffer extensions exist in CL device. Resolves: COMPMID-6453 Signed-off-by: Viet-Hoa Do Change-Id: Ibc287e4526e54be4702241ab8ca0cea0b8661b3a Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10130 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Anitha Raj Reviewed-by: Jakub Sujak Comments-Addressed: Arm Jenkins --- src/core/CL/CLHelpers.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core') diff --git a/src/core/CL/CLHelpers.cpp b/src/core/CL/CLHelpers.cpp index a32bcca655..78f36100d5 100644 --- a/src/core/CL/CLHelpers.cpp +++ b/src/core/CL/CLHelpers.cpp @@ -495,4 +495,15 @@ bool arm_matrix_multiply_supported(const cl::Device &device) { return device_supports_extension(device, "cl_arm_matrix_multiply"); } + +bool command_buffer_supported(const cl::Device &device) +{ + return device_supports_extension(device, "cl_khr_command_buffer"); +} + +bool command_buffer_mutable_dispatch_supported(const cl::Device &device) +{ + return device_supports_extension(device, "cl_khr_command_buffer_mutable_dispatch"); +} + } // namespace arm_compute -- cgit v1.2.1