ParseParamsByOperatorFn

Description

Registers a function for parsing the attributes of a custom operator.

Prototype

1
OpRegistrationData &ParseParamsByOperatorFn(const ParseParamByOpFunc &parse_param_by_op_fn)

Parameters

Parameter

Input/Output

Description

parse_param_by_op_fn

Input

Function for parsing the attributes of a custom operator. For details, see Callback Function ParseParamByOpFunc.

Callback Function ParseParamByOpFunc

Call the user-defined ParseParamByOpFunc function to map operator attributes of the original model to those of the model adapted to Ascend AI Processor and fill the result in class Operator.

1
Status ParseParamByOpFunc(const ge::Operator &op_origin, ge::Operator &op_dest)
Table 1 Parameters

Parameter

Input/Output

Description

op_origin

Input

An object of the Operator class defined by the framework, including the custom operator attributes of the original model.

For details about the Operator class, see Operator.

op_dest

Output

Operator data structure of the model adapted to Ascend AI Processor, which stores operator information.

For details about the Operator class, see Operator.

Constraints

None