AddOp

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File/Library File

  • Header file: #include <graph/graph.h>
  • Library file: libgraph.so

Function Usage

Registers an unconnected operator with a graph for query and object obtaining.

Prototype

1
graphStatus AddOp(const ge::Operator &op)

Parameters

Parameter

Input/Output

Description

op

Input

Operator to be added.

Returns

Parameter

Type

Description

-

graphStatus

SUCCESS: success.

FAILED: failure.

Restrictions

This API is optional. For a switchover between functions, an operator object may be a local variable and cannot be obtained by functions. In this case, the operator can be registered with the graph to obtain the previously created operator object. After the operator object is registered in the graph, the operator object exists unless the graph is destroyed.