--shape_generalized_build_mode

Description

Do not use this option because it will be deprecated in later versions.

Sets the shape build mode during graph build.

See Also

This option is mutually exclusive with --input_shape_range, --dynamic_batch_size, --dynamic_image_size, and --dynamic_dims.

Argument

Argument:

  • shape_generalized: fuzzy build. The system generalizes the runtime dimensions of dynamic-shape operators before build. If the operator shape is static, the rank of dimensions remains (for example, 4D operators remain 4D operators after fuzzy compilation) and the values of dynamic dimensions are changed to -1 for compilation.

    This argument is used when you want to run multiple inferences based on one compilation.

  • shape_precise (default): precise build. The system directly performs build based on the specified shape without any escape operations.

Restrictions: If the operator supports only static shape with dimensions unchanged, the operator is built based on the static shape without generalization performed through fuzzy compilation.

Figure 1 shows the two compilation modes.
Figure 1 Compilation modes

Suggestions and Benefits

None

Example

--shape_generalized_build_mode=shape_generalized

Restrictions

If this option is used to set fuzzy build during model conversion, add the aclmdlSetDatasetTensorDesc API before the aclmdlExecute API to set the real shape range when using an application project for model inference.