Restrictions

Use Case

Precautions

Inference is performed on the same model.

AIPP (static AIPP and dynamic AIPP) and dynamic dimensions (ND format only) are mutually exclusive.

Inference is performed on the same model.

Select only one of the following methods:

Output buffer allocation for model inference

You can apply for the memory based on the actual size of each level, or call the aclmdlGetOutputSizeByIndex API to obtain the memory size and then apply for the memory. (This method is recommended to ensure that the memory is sufficient.)

When static AIPP and dynamic image size are used at the same time

Because the width and height of the input image are uncertain in the dynamic image size scenario, when the insert_op_conf parameter of the ATC tool is used to take the AIPP configuration file, the crop and padding functions cannot be enabled in the AIPP configuration file. Additionally, the src_image_size_w and src_image_size_h values in the configuration file need to be set to 0.

Both dynamic AIPP and dynamic batch size enabled

  • The batchSize parameter passed to the aclmdlCreateAIPP call must be set to the allowed maximum batch size.
  • For data nodes that require dynamic AIPP, the corresponding input buffer must be allocated based on the maximum batch size.

When dynamic AIPP and dynamic image size are used at the same time

  • If the image cropping, resizing, or padding function is enabled in setting the dynamic AIPP attributes, dynamic image size becomes unavailable.
  • If the image cropping, resizing, or padding function is not enabled in setting the dynamic AIPP attributes, dynamic AIPP and dynamic image size are both available. Ensure that the allowed maximum image size is passed to the aclmdlSetAIPPSrcImageSize call and aclmdlSetDynamicHWSize call.
  • For data nodes that require dynamic AIPP, the corresponding input buffer must be allocated based on the allowed maximum image size.

Dynamic AIPP and dynamic shape input (setting the shape range) are used at the same time.

The width and height of the output image of dynamic AIPP must be within the configured shape range.