PrecisionReduceFlag

Function Usage

Controls the operator precision mode during ATC-based model conversion or network commissioning. This parameter is valid only when precision_mode is set to allow_mix_precision.

Prototype

OpAICoreConfig& PrecisionReduceFlag(bool flag);

Parameters

Parameter

Input/Output

Description

flag

Input

  • If this parameter is set to false, the operator is on the blocklist. In this case, the original data type of the operator must be retained.
  • If it is set to true, the operator is on the trustlist. If the operator supports both float32 and float16 and the original graph format of the operator is float32 or float16, float16 is preferentially selected.
  • If it is not set, the operator is on the graylist. In this case, if an upstream operator exists, the data type of the upstream operator is selected. Otherwise, the original data type of the current operator is selected.

Returns

OpAICoreConfig class. For details, see OpAICoreConfig.

Constraints

None