From 8c49f16e5909a9bd5dc6e68638d2e2d8acc2fc66 Mon Sep 17 00:00:00 2001 From: Jakub Sujak Date: Fri, 16 Jun 2023 09:52:50 +0100 Subject: Add helpers to set CKW tensor components as OpenCL kernel arguments * Define ckw::TensorStorage. The tensor storage represents the type of tensor memory object. * Add helper functions for setting the CKW TensorComponent and TensorStorage as OpenCL kernel arguments. * Refactor CL Image2D method for simpler image object creation. Resolves: COMPMID-5784 Change-Id: I2d37d06783c1dc55f3b5692b44eb49b151f2401c Signed-off-by: Jakub Sujak Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9807 Tested-by: Arm Jenkins Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- compute_kernel_writer/include/ckw/TensorInfo.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'compute_kernel_writer/include') diff --git a/compute_kernel_writer/include/ckw/TensorInfo.h b/compute_kernel_writer/include/ckw/TensorInfo.h index b5f76cffa5..44846bc94c 100644 --- a/compute_kernel_writer/include/ckw/TensorInfo.h +++ b/compute_kernel_writer/include/ckw/TensorInfo.h @@ -86,6 +86,16 @@ enum class TensorComponent : uint32_t Dim1xDim2xDim3 = 0x08001110 }; +/** Compute Kernel Writer tensor storage. The tensor storage represents the type of tensor memory object. + */ +enum class TensorStorage : uint32_t +{ + Unknown = 0x00000000, + BufferUint8Ptr = 0x01000000, + Texture2dReadOnly = 0x02000001, + Texture2dWriteOnly = 0x02000010, +}; + /** Compute Kernel Writer tensor shape * Negative dimensions can be interpreted as dynamic dimensions by the Compute Kernel Writer */ -- cgit v1.2.1