add new format for transdata

This commit is contained in:
jiaorui 2023-02-09 19:34:27 +08:00
parent 43ffa26a3a
commit 6f51f132f9
2 changed files with 4 additions and 0 deletions

View File

@ -83,6 +83,7 @@ trans_data_op_info = TBERegOp("TransData") \
.dtype_format(DataType.I8_NHWC, DataType.I8_HWCN) \
.dtype_format(DataType.I8_HWCN, DataType.I8_Default) \
.dtype_format(DataType.I8_HWCN, DataType.I8_NHWC) \
.dtype_format(DataType.I8_Default, DataType.I8_NC1HWC0) \
.dtype_format(DataType.I16_Default, DataType.I16_NHWC) \
.dtype_format(DataType.I16_Default, DataType.I16_HWCN) \
.dtype_format(DataType.I16_NHWC, DataType.I16_Default) \
@ -109,6 +110,7 @@ trans_data_op_info = TBERegOp("TransData") \
.dtype_format(DataType.U8_NHWC, DataType.U8_HWCN) \
.dtype_format(DataType.U8_HWCN, DataType.U8_Default) \
.dtype_format(DataType.U8_HWCN, DataType.U8_NHWC) \
.dtype_format(DataType.U8_Default, DataType.U8_NC1HWC0) \
.dtype_format(DataType.U16_Default, DataType.U16_NHWC) \
.dtype_format(DataType.U16_Default, DataType.U16_HWCN) \
.dtype_format(DataType.U16_NHWC, DataType.U16_Default) \

View File

@ -1219,6 +1219,7 @@ class DataType:
I8_NDHWC = ("int8", "NDHWC")
I8_ChannelLast = ("int8", "ChannelLast")
I8_NDC1HWC0 = ("int8", "NDC1HWC0")
I8_NC1HWC0 = ("int8", "NC1HWC0")
U8_None = ("uint8", "")
U8_Default = ("uint8", "DefaultFormat")
@ -1232,6 +1233,7 @@ class DataType:
U8_NDHWC = ("uint8", "NDHWC")
U8_ChannelLast = ("uint8", "ChannelLast")
U8_NDC1HWC0 = ("uint8", "NDC1HWC0")
U8_NC1HWC0 = ("uint8", "NC1HWC0")
I16_None = ("int16", "")
I16_Default = ("int16", "DefaultFormat")