aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/include/ckw/TensorInfo.h
diff options
context:
space:
mode:
authorJakub Sujak <jakub.sujak@arm.com>2023-06-16 09:52:50 +0100
committerJakub Sujak <jakub.sujak@arm.com>2023-06-26 13:07:05 +0000
commit8c49f16e5909a9bd5dc6e68638d2e2d8acc2fc66 (patch)
tree7e6c13c7f4522ea2db1ccdafe7c2858632ee4532 /compute_kernel_writer/include/ckw/TensorInfo.h
parent7d9a78ebfb3553b95421a0da5e2686a3923748db (diff)
downloadComputeLibrary-8c49f16e5909a9bd5dc6e68638d2e2d8acc2fc66.tar.gz
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 <jakub.sujak@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9807 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/include/ckw/TensorInfo.h')
-rw-r--r--compute_kernel_writer/include/ckw/TensorInfo.h10
1 files changed, 10 insertions, 0 deletions
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
*/