FilesLast commitLast update
19 hours ago
1 month ago
8 days ago
11 days ago
20 days ago
26 days ago
1 month ago
7 days ago
20 days ago
26 days ago
5 days ago
README

TransData

English | 简体中文

Product Support Status

Product Supported
Ascend 950PR&950DT products √
Atlas A3 products √
Atlas A2 products √
Atlas 200I/500 A2 inference products √
Atlas inference products √
Atlas training products √

Function Description

  • Operator function: performs format conversion for various data formats.

Parameter Description

Parameter Name Input/Output/Attribute Description Data Type Data Format
src Input Tensor to be converted. BFLOAT16, FLOAT16, FLOAT32, INT32, INT8, BOOL, INT16, INT64, UINT8, UINT16, UINT32, UINT64 ND
src_format Attribute String of the source data format. STRING -
dst_format Attribute String of the destination data format. STRING -
src_subformat Attribute Source sub data format. INT -
dst_subformat Attribute Destination sub data format. INT -
groups Attribute Name of the groups column in the Constraint Description. INT -
dst Output Output result. BFLOAT16, FLOAT16, FLOAT32, INT32, INT8, BOOL, INT16, INT64, UINT8, UINT16, UINT32, UINT64 ND
  • For branches with padding: INT16, INT64, UINT8, UINT16, UINT32, and UINT64 are not supported.

Constraint Description

  • The following value ranges must be met: '<====>' indicates that the format is supported in both directions, whether as input or output. '====>' indicates that this format conversion is not supported, and the input and output data types must correspond to each other. Introduction to Data Formats

    src_format <====> dst_format dtype C0 groups
    NCHW <====> NC1HWC0 float32, int32,uint32 8,16 1
    NCHW <====> NC1HWC0 bfloat16, float16 16 1
    NCHW <====> NC1HWC0 int8, uint8 32 1
    NHWC <====> NC1HWC0 float32, int32,uint32 8,16 1
    NHWC <====> NC1HWC0 bfloat16, float16 16 1
    NHWC <====> NC1HWC0 int8, uint8 32 1
    ND <====> FRACTAL_NZ float32, int32,uint32 16 1
    ND <====> FRACTAL_NZ bfloat16, float16 16 1
    ND <====> FRACTAL_NZ int8, uint8 32 1
    NCHW <====> FRACTAL_Z float32, int32,uint32 8,16 1
    NCHW <====> FRACTAL_Z bfloat16, float16 16 1
    NCHW <====> FRACTAL_Z int8, uint8 32 1
    HWCN <====> FRACTAL_Z float32, int32,uint32 8,16 1
    HWCN <====> FRACTAL_Z bfloat16, float16 16 1
    HWCN <====> FRACTAL_Z int8, uint8 32 1
    NCDHW <====> NDC1HWC0 float32, int32,uint32 8,16 1
    NCDHW <====> NDC1HWC0 bfloat16, float16 16 1
    NCDHW <====> NDC1HWC0 int8, uint8 32 1
    NDHWC <====> NDC1HWC0 float32, int32,uint32 8,16 1
    NDHWC <====> NDC1HWC0 bfloat16, float16 16 1
    NDHWC <====> NDC1HWC0 int8, uint8 32 1
    NCDHW <====> FRACTAL_Z_3D float32, int32,uint32 8,16 1
    NCDHW <====> FRACTAL_Z_3D bfloat16, float16 16 1
    NCDHW <====> FRACTAL_Z_3D int8, uint8 32 1
    DHWCN <====> FRACTAL_Z_3D float32, int32,uint32 16 1
    DHWCN <====> FRACTAL_Z_3D bfloat16, float16 16 1
    DHWCN <====> FRACTAL_Z_3D int8, uint8 32 1
    NCHW <====> FRACTAL_Z float32, uint32, int32 8 >1
    NCHW <====> FRACTAL_Z float16, bfloat16, uint16, int16 16 >1
    HWCN ====> FRACTAL_Z float16, bfloat16, uint16, int16 16 >1
    NCDHW <====> FRACTAL_Z_3D float32, uint32, int32 8 >1
    NCDHW <====> FRACTAL_Z_3D float16, bfloat16, uint16, int16 16 >1
    FRACTAL_Z_3D ====> DHWCN float32, uint32, int32 8 >1
    FRACTAL_Z_3D ====> DHWCN float16, bfloat16, uint16, int16 16 >1
    NCHW ====> FRACTAL_Z_C04 float16, bfloat16 16 1
    FRACTAL_Z_C04 ====> NCHW float32 16 1
    ND ====> FRACTAL_NZ_C0_16 float32, uint32, int32 16 1

Invocation Description

Invocation Method Sample Code Description
aclnn API test_aclnn_trans_matmul_weight Invokes the Pack operator through the aclnnTransMatmulWeight API.