diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-08-11 17:48:54 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-08-15 10:58:50 +0000 |
commit | 48b6d17f8958c5bc9fa715853d227e430e3547e8 (patch) | |
tree | f8e71135b07793acefa6f359bf3c5cbc0d06a1ce /arm_compute | |
parent | 7d91c615b594d5e9abb1753b3f572f64b0581a48 (diff) | |
download | ComputeLibrary-48b6d17f8958c5bc9fa715853d227e430e3547e8.tar.gz |
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 <viet-hoa.do@arm.com>
Change-Id: Ibc287e4526e54be4702241ab8ca0cea0b8661b3a
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10130
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Anitha Raj <Anitha.Raj@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/CLHelpers.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index a162b1c118..20d93df5a1 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Arm Limited. + * Copyright (c) 2016-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -267,5 +267,22 @@ void set_unroll_with_pragma(CLBuildOptions &built_opts, std::initializer_list<in * @return True if the extension is supported */ bool arm_matrix_multiply_supported(const cl::Device &device); + +/** Check whether cl_khr_command_buffer extension is supported by the specified CL device. + * + * @param[in] device The CL device + * + * @return True if the extension is supported by the CL device. + */ +bool command_buffer_supported(const cl::Device &device); + +/** Check whether cl_khr_command_buffer_mutable_dispatch extension is supported by the specified CL device. + * + * @param[in] device The CL device + * + * @return True if the extension is supported by the CL device. + */ +bool command_buffer_mutable_dispatch_supported(const cl::Device &device); + } // namespace arm_compute #endif /* ARM_COMPUTE_CLHELPERS_H */ |