blob: c6afc4f69aebc07f858349d2064e70d216b96509 [file] [log] [blame]
Eric Kunze3309a532020-10-01 18:50:46 -07001//
2// This confidential and proprietary software may be used only as
3// authorised by a licensing agreement from ARM Limited
Kevin Petita7ac3132024-01-08 15:27:25 +00004// (C) COPYRIGHT 2020-2024 ARM Limited
Eric Kunze3309a532020-10-01 18:50:46 -07005// ALL RIGHTS RESERVED
6// The entire notice above must be reproduced on all authorised
7// copies and copies may only be made to the extent permitted
8// by a licensing agreement from ARM Limited.
9
10=== Data Layout
11
12==== CONCAT
Eric Kunze54ff87d2021-02-22 13:21:05 -080013Concatenate a list of tensors along a given axis.
14No data conversion happens during a concat operation.
Eric Kunze3309a532020-10-01 18:50:46 -070015
Eric Kunze58098a72022-08-05 15:40:12 -070016include::{generated}/operators/CONCAT.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070017
Eric Kunze3309a532020-10-01 18:50:46 -070018[source,c]
19----
Kevin Petita7ac3132024-01-08 15:27:25 +000020include::{pseudocode}/operators/CONCAT.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070021----
22
Eric Kunze3309a532020-10-01 18:50:46 -070023==== PAD
24
Eric Kunzec949f8a2021-09-16 14:51:26 -070025Pads a tensor along the borders of each dimension with a supplied value.
26Returns a new tensor with the padding included.
Eric Kunze31704392021-10-25 16:04:20 -070027The pad_const value includes the zero point if the tensor uses a zero point.
Eric Kunze3309a532020-10-01 18:50:46 -070028
Eric Kunze58098a72022-08-05 15:40:12 -070029include::{generated}/operators/PAD.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070030
Eric Kunze839830a2021-03-11 15:38:22 -080031[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -070032----
Kevin Petita7ac3132024-01-08 15:27:25 +000033include::{pseudocode}/operators/PAD.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070034----
35
Dominic Symes830b43b2023-05-09 10:14:49 +010036==== DIM
37
Eric Kunze526f6c72024-01-12 17:18:42 -080038Returns a length 1 shape_t of the size of the input tensor for the given axis.
Dominic Symes830b43b2023-05-09 10:14:49 +010039
40include::{generated}/operators/DIM.adoc[]
41
42[source,c++]
43----
Kevin Petita7ac3132024-01-08 15:27:25 +000044include::{pseudocode}/operators/DIM.tosac[lines=10..-1]
Dominic Symes830b43b2023-05-09 10:14:49 +010045----
46
Eric Kunze3309a532020-10-01 18:50:46 -070047==== RESHAPE
48
49Returns a tensor with the same type/values as the input, with a new shape specified by the shape argument. Reshape may operate on tensors of any rank. No data conversion happens during a reshape operation.
50
Eric Kunze58098a72022-08-05 15:40:12 -070051include::{generated}/operators/RESHAPE.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070052
Eric Kunze839830a2021-03-11 15:38:22 -080053[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -070054----
Kevin Petita7ac3132024-01-08 15:27:25 +000055include::{pseudocode}/operators/RESHAPE.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070056----
57
Eric Kunze3309a532020-10-01 18:50:46 -070058==== REVERSE
59
Dominic Symesa07ca7a2020-10-13 10:18:46 +010060Returns a tensor with the same type/values as the input, with the data reversed along the given axis. No data conversion happens during a reverse operation.
Eric Kunze3309a532020-10-01 18:50:46 -070061
Eric Kunze58098a72022-08-05 15:40:12 -070062include::{generated}/operators/REVERSE.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070063
Eric Kunze839830a2021-03-11 15:38:22 -080064[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -070065----
Kevin Petita7ac3132024-01-08 15:27:25 +000066include::{pseudocode}/operators/REVERSE.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070067----
68
Eric Kunze3309a532020-10-01 18:50:46 -070069==== SLICE
70
Kevin Petit1cf84e92022-11-30 15:20:19 +000071Extracts a slice of input1, beginning at the start coordinates, and extending for size elements in each direction.
Eric Kunze1e9ba652021-02-17 19:23:39 -080072No data conversion happens during a slice operation.
Eric Kunze3309a532020-10-01 18:50:46 -070073
Eric Kunze58098a72022-08-05 15:40:12 -070074include::{generated}/operators/SLICE.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070075
Eric Kunze839830a2021-03-11 15:38:22 -080076[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -070077----
Kevin Petita7ac3132024-01-08 15:27:25 +000078include::{pseudocode}/operators/SLICE.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070079----
80
Eric Kunze3309a532020-10-01 18:50:46 -070081==== TILE
82
Eric Kunzed8f725c2022-05-20 16:53:33 -070083Replicates input1 multiples times along each dimension.
Eric Kunze3309a532020-10-01 18:50:46 -070084
Eric Kunze58098a72022-08-05 15:40:12 -070085include::{generated}/operators/TILE.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070086
Eric Kunze839830a2021-03-11 15:38:22 -080087[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -070088----
Kevin Petita7ac3132024-01-08 15:27:25 +000089include::{pseudocode}/operators/TILE.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -070090----
91
Eric Kunze3309a532020-10-01 18:50:46 -070092==== TRANSPOSE
93
Eric Kunze32c91b02022-01-24 11:32:40 -080094Permutes the dimensions of the input tensor input1 based on the perms argument.
95Each value in the perms list must be a valid dimension of the input tensor and may not be repeated.
Eric Kunze3309a532020-10-01 18:50:46 -070096
Eric Kunze58098a72022-08-05 15:40:12 -070097include::{generated}/operators/TRANSPOSE.adoc[]
Eric Kunze3309a532020-10-01 18:50:46 -070098
Eric Kunze839830a2021-03-11 15:38:22 -080099[source,c++]
Eric Kunze3309a532020-10-01 18:50:46 -0700100----
Kevin Petita7ac3132024-01-08 15:27:25 +0000101include::{pseudocode}/operators/TRANSPOSE.tosac[lines=10..-1]
Eric Kunze3309a532020-10-01 18:50:46 -0700102----