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 /arm_compute | |
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 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/CLHelpers.h | 16 | ||||
-rw-r--r-- | arm_compute/core/CL/OpenCL.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/arm_compute/core/CL/CLHelpers.h b/arm_compute/core/CL/CLHelpers.h index c5db66c664..fc3f4d5db0 100644 --- a/arm_compute/core/CL/CLHelpers.h +++ b/arm_compute/core/CL/CLHelpers.h @@ -121,6 +121,14 @@ GPUTarget get_target_from_device(const cl::Device &device); */ CLVersion get_cl_version(const cl::Device &device); +/** Helper function to get the cl_image pitch alignment in pixels + * + * @param[in] device A CL device + * + * @return the cl_image pitch alignment in pixels. If an error occurs, the function will return 0 + */ +size_t get_cl_image_pitch_alignment(const cl::Device &device); + /** Helper function to check whether a given extension is supported * * @param[in] device A CL device @@ -188,6 +196,14 @@ size_t preferred_vector_width(const cl::Device &device, DataType dt); */ bool preferred_dummy_work_items_support(const cl::Device &device); +/** Helper function to check whether the cl_khr_image2d_from_buffer extension is supported + * + * @param[in] device A CL device + * + * @return True if the extension is supported + */ +bool image2d_from_buffer_supported(const cl::Device &device); + /** Creates an opencl kernel * * @param[in] ctx A context to be used to create the opencl kernel. diff --git a/arm_compute/core/CL/OpenCL.h b/arm_compute/core/CL/OpenCL.h index b87cc67b72..72cbb3d2b2 100644 --- a/arm_compute/core/CL/OpenCL.h +++ b/arm_compute/core/CL/OpenCL.h @@ -134,6 +134,7 @@ public: DECLARE_FUNCTION_PTR(clEnqueueSVMUnmap); DECLARE_FUNCTION_PTR(clEnqueueMarker); DECLARE_FUNCTION_PTR(clWaitForEvents); + DECLARE_FUNCTION_PTR(clCreateImage); // Third-party extensions DECLARE_FUNCTION_PTR(clImportMemoryARM); |