From a98dee2da0aef1c53a31045b0c681fb0abc8f8ba Mon Sep 17 00:00:00 2001 From: Gian Marco Iodice Date: Tue, 2 Jun 2020 12:12:35 +0100 Subject: COMPMID-3319: Force padding requirement in CLGEMMReshapeRHSMatrixKernel Added padding requirement in CLGEMMReshapeRHSMatrixKernel in order to create 2d image from a cl_buffer. Test extended in order to validate the padding requirement Change-Id: I36bcaf3e9299ee186602b4e3456851cc8cda6ce6 Signed-off-by: Gian Marco Iodice Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3292 Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/OpenCL.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/core/CL/OpenCL.cpp') diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp index 9a3e344f1f..809f21b89e 100644 --- a/src/core/CL/OpenCL.cpp +++ b/src/core/CL/OpenCL.cpp @@ -133,6 +133,7 @@ bool CLSymbols::load(const std::string &library) LOAD_FUNCTION_PTR(clEnqueueSVMUnmap, handle); LOAD_FUNCTION_PTR(clEnqueueMarker, handle); LOAD_FUNCTION_PTR(clWaitForEvents, handle); + LOAD_FUNCTION_PTR(clCreateImage, handle); // Third-party extensions LOAD_FUNCTION_PTR(clImportMemoryARM, handle); @@ -937,6 +938,30 @@ clGetEventProfilingInfo(cl_event event, } } +cl_mem +clCreateImage(cl_context context, + cl_mem_flags flags, + const cl_image_format *image_format, + const cl_image_desc *image_desc, + void *host_ptr, + cl_int *errcode_ret) +{ + arm_compute::CLSymbols::get().load_default(); + auto func = arm_compute::CLSymbols::get().clCreateImage_ptr; + if(func != nullptr) + { + return func(context, flags, image_format, image_desc, host_ptr, errcode_ret); + } + else + { + if(errcode_ret != nullptr) + { + *errcode_ret = CL_OUT_OF_RESOURCES; + } + return nullptr; + } +} + cl_mem clImportMemoryARM(cl_context context, cl_mem_flags flags, -- cgit v1.2.1