Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 1 | // |
| 2 | // This confidential and proprietary software may be used only as |
| 3 | // authorised by a licensing agreement from ARM Limited |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 4 | // (C) COPYRIGHT 2020-2024 ARM Limited |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 5 | // 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 Kunze | 54ff87d | 2021-02-22 13:21:05 -0800 | [diff] [blame] | 13 | Concatenate a list of tensors along a given axis. |
| 14 | No data conversion happens during a concat operation. |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 15 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 16 | include::{generated}/operators/CONCAT.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 17 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 18 | [source,c] |
| 19 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 20 | include::{pseudocode}/operators/CONCAT.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 21 | ---- |
| 22 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 23 | ==== PAD |
| 24 | |
Eric Kunze | c949f8a | 2021-09-16 14:51:26 -0700 | [diff] [blame] | 25 | Pads a tensor along the borders of each dimension with a supplied value. |
| 26 | Returns a new tensor with the padding included. |
Eric Kunze | 3170439 | 2021-10-25 16:04:20 -0700 | [diff] [blame] | 27 | The pad_const value includes the zero point if the tensor uses a zero point. |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 28 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 29 | include::{generated}/operators/PAD.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 30 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 31 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 32 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 33 | include::{pseudocode}/operators/PAD.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 34 | ---- |
| 35 | |
Dominic Symes | 830b43b | 2023-05-09 10:14:49 +0100 | [diff] [blame] | 36 | ==== DIM |
| 37 | |
Eric Kunze | 526f6c7 | 2024-01-12 17:18:42 -0800 | [diff] [blame^] | 38 | Returns a length 1 shape_t of the size of the input tensor for the given axis. |
Dominic Symes | 830b43b | 2023-05-09 10:14:49 +0100 | [diff] [blame] | 39 | |
| 40 | include::{generated}/operators/DIM.adoc[] |
| 41 | |
| 42 | [source,c++] |
| 43 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 44 | include::{pseudocode}/operators/DIM.tosac[lines=10..-1] |
Dominic Symes | 830b43b | 2023-05-09 10:14:49 +0100 | [diff] [blame] | 45 | ---- |
| 46 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 47 | ==== RESHAPE |
| 48 | |
| 49 | Returns 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 Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 51 | include::{generated}/operators/RESHAPE.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 52 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 53 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 54 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 55 | include::{pseudocode}/operators/RESHAPE.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 56 | ---- |
| 57 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 58 | ==== REVERSE |
| 59 | |
Dominic Symes | a07ca7a | 2020-10-13 10:18:46 +0100 | [diff] [blame] | 60 | Returns 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 Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 61 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 62 | include::{generated}/operators/REVERSE.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 63 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 64 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 65 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 66 | include::{pseudocode}/operators/REVERSE.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 67 | ---- |
| 68 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 69 | ==== SLICE |
| 70 | |
Kevin Petit | 1cf84e9 | 2022-11-30 15:20:19 +0000 | [diff] [blame] | 71 | Extracts a slice of input1, beginning at the start coordinates, and extending for size elements in each direction. |
Eric Kunze | 1e9ba65 | 2021-02-17 19:23:39 -0800 | [diff] [blame] | 72 | No data conversion happens during a slice operation. |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 73 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 74 | include::{generated}/operators/SLICE.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 75 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 76 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 77 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 78 | include::{pseudocode}/operators/SLICE.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 79 | ---- |
| 80 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 81 | ==== TILE |
| 82 | |
Eric Kunze | d8f725c | 2022-05-20 16:53:33 -0700 | [diff] [blame] | 83 | Replicates input1 multiples times along each dimension. |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 84 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 85 | include::{generated}/operators/TILE.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 86 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 87 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 88 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 89 | include::{pseudocode}/operators/TILE.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 90 | ---- |
| 91 | |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 92 | ==== TRANSPOSE |
| 93 | |
Eric Kunze | 32c91b0 | 2022-01-24 11:32:40 -0800 | [diff] [blame] | 94 | Permutes the dimensions of the input tensor input1 based on the perms argument. |
| 95 | Each value in the perms list must be a valid dimension of the input tensor and may not be repeated. |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 96 | |
Eric Kunze | 58098a7 | 2022-08-05 15:40:12 -0700 | [diff] [blame] | 97 | include::{generated}/operators/TRANSPOSE.adoc[] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 98 | |
Eric Kunze | 839830a | 2021-03-11 15:38:22 -0800 | [diff] [blame] | 99 | [source,c++] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 100 | ---- |
Kevin Petit | a7ac313 | 2024-01-08 15:27:25 +0000 | [diff] [blame] | 101 | include::{pseudocode}/operators/TRANSPOSE.tosac[lines=10..-1] |
Eric Kunze | 3309a53 | 2020-10-01 18:50:46 -0700 | [diff] [blame] | 102 | ---- |