[layout] Add raw data layout
authorDongju Chae <dongju.chae@samsung.com>
Wed, 4 Aug 2021 07:00:52 +0000 (16:00 +0900)
committer채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 <dongju.chae@samsung.com>
Thu, 5 Aug 2021 00:32:32 +0000 (09:32 +0900)
This patch adds new enum value, DATA_LAYOUT_RAW.

When it's specified, npu-engine skips data layout conversion which means
the tensor size should be matched with the corresponding segment size.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
include/common/typedef.h

index 6b479452c4edc7b12dca843e3792dbb6b4b5236b..a87c826d79eb935201a5a3b353d07a8ac9ed2794 100644 (file)
@@ -53,7 +53,7 @@ typedef enum {
  * @brief Description of data layout.
  */
 typedef enum {
-  DATA_LAYOUT_NONE = 0, /**< undefined layout, regarded as raw data */
+  DATA_LAYOUT_NONE = 0, /**< undefined layout, regarded as TRIV2 */
   DATA_LAYOUT_NHWC,     /**< standard layout, NHWC */
   DATA_LAYOUT_NCHW,     /**< standard layout, NCHW */
   DATA_LAYOUT_TRIV,     /**< customized layout for TRIV1 (based on NHWC) */
@@ -61,6 +61,7 @@ typedef enum {
   /**< alias for backward-compatibility */
   DATA_LAYOUT_TRIV2, /**< customized layout for TRIV2 (based on NHWC) */
   DATA_LAYOUT_MODEL, /**< use the same data layout specified in model metadata */
+  DATA_LAYOUT_RAW, /**< any raw data. npu-engine does not care about its layout */
 } data_layout;
 
 /**