!26898 Add cast transdata operators register format.

Merge pull request !26898 from liangchenghui/add_cast_op_format
This commit is contained in:
i-robot 2021-11-30 06:17:32 +00:00 committed by Gitee
commit ffda5a43bf
2 changed files with 3 additions and 0 deletions

View File

@ -104,6 +104,7 @@ cast_op_info = AiCPURegOp("Cast") \
.dtype_format(DataType.I32_Default, DataType.F32_Default) \
.dtype_format(DataType.I32_Default, DataType.F64_Default) \
.dtype_format(DataType.I32_Default, DataType.BOOL_Default) \
.dtype_format(DataType.I32_5HD, DataType.I64_5HD) \
.dtype_format(DataType.I64_Default, DataType.U8_Default) \
.dtype_format(DataType.I64_Default, DataType.U16_Default) \
.dtype_format(DataType.I64_Default, DataType.U32_Default) \

View File

@ -24,6 +24,8 @@ trans_data_op_info = AiCPURegOp("TransData") \
.attr("dst_format", "str") \
.dtype_format(DataType.U16_Default, DataType.U16_5HD) \
.dtype_format(DataType.U16_5HD, DataType.U16_Default) \
.dtype_format(DataType.I64_5HD, DataType.I64_Default) \
.dtype_format(DataType.I32_5HD, DataType.I32_Default) \
.get_op_info()
@op_info_register(trans_data_op_info)