aclFormat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | typedef enum { ACL_FORMAT_UNDEFINED = -1, ACL_FORMAT_NCHW = 0, ACL_FORMAT_NHWC = 1, ACL_FORMAT_ND = 2, ACL_FORMAT_NC1HWC0 = 3, ACL_FORMAT_FRACTAL_Z = 4, ACL_FORMAT_NC1HWC0_C04 = 12, ACL_FORMAT_HWCN = 16, ACL_FORMAT_NDHWC = 27, ACL_FORMAT_FRACTAL_NZ = 29, ACL_FORMAT_NCDHW = 30, ACL_FORMAT_NDC1HWC0 = 32, ACL_FRACTAL_Z_3D = 33, ACL_FORMAT_NC = 35, ACL_FORMAT_NCL = 47, ACL_FORMAT_FRACTAL_NZ_C0_16 = 50, ACL_FORMAT_FRACTAL_NZ_C0_32 = 51, ACL_FORMAT_FRACTAL_NZ_C0_2 = 52, ACL_FORMAT_FRACTAL_NZ_C0_4 = 53, ACL_FORMAT_FRACTAL_NZ_C0_8 = 54, } aclFormat; |
The available dimensions of a feature image are the batch size (N), height (H), width (W), channels (C), depth (D), and length (L).
The fields for aclFormat are described as follows:
- UNDEFINED (default): unknown format.
- NCHW: a 4D format.
- NHWC: a 4D format.
- ND: any format, applicable to operators that take singular inputs, such as Square and Tanh. Exercise caution when using other operators.
- NC1HWC0: a 5D format. C0 is closely related to the micro-architecture, and the value is equal to the Cube Unit size, for example, 16. C1 is obtained by dividing the C dimension by C0, that is, C1 = C/C0. When the division is not exact, the last data segment is padded to C0.
- FRACTAL_Z: a format of the convolution weight.
- NC1HWC0_C04: a 5D data format. C0 has a fixed value of 4 while C1 = C/C0. When C is not exactly divisible by C0, the last data segment is padded to C0. It is not supported by the current version.
- HWCN: a 4D format.
- NDHWC: The depth (D) dimension is required for 3D images.
- FRACTAL_NZ: an internal format for fractals. It is not required currently.
- NCDHW: The depth (D) dimension is required for 3D images.
- NDC1HWC0: a 6D data format. It has an additional depth (D) dimension compared with NC1HWC0.
- FRACTAL_Z_3D: a 3D convolution weight format, which is required by operators such as Conv3D, MaxPool3D, and AvgPool3D.
- NC: a 2D format.
- NCL: a 3D format.
- FRACTAL_NZ_C0_[M]: a special internal data layout format for fractals, where [M] indicates the value of C0. Currently, the value can be 2, 4, 8, 16, or 32. It is not required currently.
Only the
Ascend 950PR /Ascend 950DT support this type.
Parent topic: Data Types and Operation APIs