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
} aclFormat;
- UNDEFINED (default): unknown format
- NCHW
- NHWC
- ND: any format, applicable to operators that take singular inputs, such as Square and Tanh.
- 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: the format of the convolution weight.
- NC1HWC0_C04: a 5D 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
- NDHWC: The depth (D) dimension is required for 3D images.
- FRACTAL_NZ: a format for internal use only.
- NCDHW: The depth (D) dimension is required for 3D images.
- NDC1HWC0: a 6D format. 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.
The available dimensions are the batch size (N), height (H), width (W), channels (C), and depth (D).