diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2020-06-02 12:12:35 +0100 |
---|---|---|
committer | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2020-06-02 17:18:29 +0000 |
commit | a98dee2da0aef1c53a31045b0c681fb0abc8f8ba (patch) | |
tree | b4f0a130b19c47f19d9e5b326c18cb9cc8e765e2 /src/core/CL/OpenCL.cpp | |
parent | 16bd6dd97fb704e31cd96e404e8c4148fe24d834 (diff) | |
download | ComputeLibrary-a98dee2da0aef1c53a31045b0c681fb0abc8f8ba.tar.gz |
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>
Diffstat (limited to 'src/core/CL/OpenCL.cpp')
-rw-r--r-- | src/core/CL/OpenCL.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
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); @@ -938,6 +939,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, const cl_import_properties_arm *properties, |