Build

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <ge/compliant_node_builder.h>
  • Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a

Function Usage

Builds and returns a graph node.

Prototype

1
ge::GNode Build() const

Parameters

None

Returns

Parameter

Type

Description

-

GNode

Object of the built graph node.

Constraints

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
auto ge_graph = std::make_unique<ge::Graph>("graph");
auto add_node = ge::es::CompliantNodeBuilder(ge_graph.get()).OpType("Add")
      .Name("add_0")
      .IrDefInputs({
          {"x1", ge::es::CompliantNodeBuilder::kEsIrInputRequired, ""},
          {"x2", ge::es::CompliantNodeBuilder::kEsIrInputRequired, ""},
      })  
      .IrDefOutputs({
          {"y", ge::es::CompliantNodeBuilder::kEsIrOutputRequired, ""},
      })  
      .IrDefAttrs({
      })  
      .Build();
//In this example, an Add operator instance add_0 is created in the graph based on the Add IR prototype through chain calls.