--shape_generalized_build_mode
Description
The option will be deprecated in later versions. Do not use it.
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.
Arguments
Argument:
- shape_generalized: fuzzy build. The system internally generalizes variable dimensions before operator 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 performs operator build directly based on the dimension information specified by users without any conversion 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.
Suggestions and Benefits
None
Example
--shape_generalized_build_mode=shape_generalized
Parent topic: Options That Will Be Deprecated in Later Versions
