aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/src/ITile.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/src/ITile.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/src/ITile.h')
-rw-r--r--compute_kernel_writer/src/ITile.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/compute_kernel_writer/src/ITile.h b/compute_kernel_writer/src/ITile.h
index a54fd9b794..b5585abcdf 100644
--- a/compute_kernel_writer/src/ITile.h
+++ b/compute_kernel_writer/src/ITile.h
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-#ifndef COMPUTE_KERNEL_WRITER_SRC_ITILE
-#define COMPUTE_KERNEL_WRITER_SRC_ITILE
+#ifndef CKW_SRC_ITILE
+#define CKW_SRC_ITILE
#include "ckw/TileInfo.h"
@@ -48,40 +48,6 @@ struct TileVariable
TileVariableDescriptor desc{}; /** Tile value descriptor which reports the datatype and vector length */
};
-/** Tile base class.
- * A Tile is a collection of variables (either program variables or constants) used to express a 2D data.
- */
-class ITile
-{
-public:
- virtual ~ITile() = default;
-
- /** Method to get all TileVariable objects
- *
- * @return a vector containing all @ref TileVariable objects
- */
- virtual std::vector<TileVariable> all() const = 0;
-
- /** Method to get the name of the tile.
- *
- * @return the name of the tile
- */
- virtual const std::string &name() const = 0;
-
- /** Method to get the tile info
- *
- * @return the @ref TileInfo
- */
- virtual const TileInfo &info() const = 0;
-
- /** Method to know whether the tile is assignable or not.
- * For example, a constant tile is not assignable.
- *
- * @return true if the tile is assignable
- */
- virtual bool is_assignable() const = 0;
-};
-
/** Interface to provide support for scalar access for a Tile.
*/
class IScalarAccess
@@ -130,6 +96,40 @@ public:
*/
virtual std::vector<int32_t> supported_vector_lengths() const = 0;
};
+
+/** Tile base class.
+ * A Tile is a collection of variables (either program variables or constants) used to express a 2D data.
+ */
+class ITile: public IScalarAccess
+{
+public:
+ virtual ~ITile() = default;
+
+ /** Method to get all TileVariable objects
+ *
+ * @return a vector containing all @ref TileVariable objects
+ */
+ virtual std::vector<TileVariable> all() const = 0;
+
+ /** Method to get the name of the tile.
+ *
+ * @return the name of the tile
+ */
+ virtual const std::string &name() const = 0;
+
+ /** Method to get the tile info
+ *
+ * @return the @ref TileInfo
+ */
+ virtual const TileInfo &info() const = 0;
+
+ /** Method to know whether the tile is assignable or not.
+ * For example, a constant tile is not assignable.
+ *
+ * @return true if the tile is assignable
+ */
+ virtual bool is_assignable() const = 0;
+};
} // namespace ckw
-#endif /* COMPUTE_KERNEL_WRITER_SRC_ITILE */
+#endif /* CKW_SRC_ITILE */