FusionParseParamsFn (Overload)

Description

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

Prototype

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 Ascend AI Processor and fill the result in the Operator class.

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, which stores the source operator information.

For details about the Operator class, see Operator.

op_dest

Output

Data structure that stores the fused operator information.

For details about the Operator class, see Operator.

Example

REGISTER_CUSTOM_OP(XXXXXX)
.FrameworkType(TENSORFLOW)
.FusionParseParamsFn(FusionParseParamsFn)
.OriginOpType(XXXXX)
.ImplyType(XXXXX);