FusionParseParamsFn (Overload)

Function Usage

Registers a function for parsing the attributes of a fused operator, as the overload function of FusionParseParamsFn.

Prototype

1
OpRegistrationData &FusionParseParamsFn(const FusionParseParamByOpFunc &fusion_parse_param_fn)

Parameters

Parameter

Input/Output

Description

fusion_parse_param_fn

Input

Function for parsing the attributes of a fused operator. For details, see Callback Function FusionParseParamByOpFunc.

Callback Function FusionParseParamByOpFunc

Call the user-defined FusionParseParamByOpFunc to map operator attributes of the original model to those of the model adapted to AI processor and fill the result in the Operator class.

1
Status FusionParseParamByOpFunc(const std::vector<ge::Operator> &op_src,  ge::Operator &op_dest)
Table 1 Parameters

Parameter

Input/Output

Description

op_src

Input

Data structure of the fused operator that stores the operator attributes of the original model in a group of scopes.

For details about class Operator, see Operator.

op_dest

Output

Data structure that stores the fused operator information.

For details about class Operator, see Operator.

Examples

1
2
3
4
5
REGISTER_CUSTOM_OP(XXXXXX)
.FrameworkType(TENSORFLOW)
.FusionParseParamsFn(FusionParseParamsFn)
.OriginOpType(XXXXX)
.ImplyType(XXXXX);