diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2023-12-07 11:47:50 +0000 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2023-12-08 15:48:25 +0000 |
commit | eb475ec3dc0362f1c4a3be0f7c363edc0a1fbe7e (patch) | |
tree | 005beb3d73eb0dff20d8c6b604de75e2a8250f4a /arm_compute/core/CL/OpenCL.h | |
parent | a4a2354be8de6364552896e9f1c9ac222ea52eb9 (diff) | |
download | ComputeLibrary-eb475ec3dc0362f1c4a3be0f7c363edc0a1fbe7e.tar.gz |
Fix unit tests failing in CL/UNIT/TensorAllocator
The function pointer for clImportMemoryARM should be loaded in a portable way as recommended by Khronos® as outlined here:
https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#getting-opencl-api-extension-function-pointers
using clGetExtensionFunctionAddressForPlatform() call.
All extensions should ideally be loaded using the above mentioned function.
Resolves: COMPMID-6732
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Change-Id: I482b6bde721267d5e8c08301e5780d28a9c5ba85
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10852
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/CL/OpenCL.h')
-rw-r--r-- | arm_compute/core/CL/OpenCL.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h index a5c4e39df2..8b5bf97099 100644 --- a/arm_compute/core/CL/OpenCL.h +++ b/arm_compute/core/CL/OpenCL.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_OPENCL_H -#define ARM_COMPUTE_OPENCL_H +#ifndef ACL_ARM_COMPUTE_CORE_CL_OPENCL_H +#define ACL_ARM_COMPUTE_CORE_CL_OPENCL_H #include <string> #include <utility> @@ -139,6 +139,7 @@ public: DECLARE_FUNCTION_PTR(clWaitForEvents); DECLARE_FUNCTION_PTR(clCreateImage); DECLARE_FUNCTION_PTR(clSetKernelExecInfo); + DECLARE_FUNCTION_PTR(clGetExtensionFunctionAddressForPlatform); // Command buffer and mutable dispatch command buffer extensions DECLARE_FUNCTION_PTR(clCreateCommandBufferKHR); @@ -159,4 +160,4 @@ private: std::pair<bool, bool> _loaded; }; } // namespace arm_compute -#endif /* ARM_COMPUTE_OPENCL_H */ +#endif // ACL_ARM_COMPUTE_CORE_CL_OPENCL_H |