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 <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3292
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/src/core/CL/OpenCL.cpp b/src/core/CL/OpenCL.cpp
index 9a3e344..809f21b 100644
--- a/src/core/CL/OpenCL.cpp
+++ b/src/core/CL/OpenCL.cpp
@@ -133,6 +133,7 @@
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);
@@ -938,6 +939,30 @@
}
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,
const cl_import_properties_arm *properties,