aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2023-07-25 22:32:05 +0100
committerGunes Bayir <gunes.bayir@arm.com>2023-08-07 14:05:49 +0000
commit5e842512d1f1f47a61df56556f33625e071704c3 (patch)
treec43a69727673a61862c887659bff8fb6547fc4cc /compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h
parente1c96e7e6dbf5314676fc81831e2ccb34a031ea1 (diff)
downloadComputeLibrary-5e842512d1f1f47a61df56556f33625e071704c3.tar.gz
Add Tensor3dMapper to CKW
In CKW, tensors are assumed to be 3d, except the batch dimension. Tensor3dMapper class defines how an Nd tensor is mapped to 3d. It also provides utility functions to access certain dimensions and the associated strides. Partially Resolves: COMPMID-5791 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Change-Id: I17c176220201ff92954ab5808fa1c1f29966d4e9 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9993 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h')
-rw-r--r--compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h b/compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h
index 347536512e..3a9f4f5722 100644
--- a/compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h
+++ b/compute_kernel_writer/include/ckw/types/TensorSamplerTypes.h
@@ -33,9 +33,9 @@ namespace ckw
// This enum class defines how the dimensions of a 3d tensor is mapped into x,y and z coordianates.
enum class TensorSamplerFormat : int32_t
{
- Unknown = 0,
- D0_D1xD2_1 = 1, // Original dimensions 1 and 2 are collapsed onto y-axis
- D0_D1_D2 = 2 // Original dimensions stays as they're defined. No collapsing.
+ Unknown = 0,
+ Dim0_Dim1xDim2_1 = 1, // Original dimensions 1 and 2 are collapsed onto y-axis
+ Dim0_Dim1_Dim2 = 2 // Original dimensions stays as they're defined. No collapsing.
};
/** Tensor sampler address mode enum class for X dimension
@@ -53,9 +53,8 @@ enum class TensorSamplerFormat : int32_t
enum class TensorSamplerAddressModeX : int32_t
{
Unknown = 0,
- None = 1, // The user guarantees that the coordinate is always in-bound
- OverlappingMin = 2 // (FIXED shapes only) Reduce the load/store length when x == 0 (MIN). The load length will be width % original length
- // Leftover elements can be handled using overlapping. This involves processing some of the elements in the array twice.
+ None = 1,
+ OverlappingMin = 2
};
/**