Build
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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. |
Parent topic: CompliantNodeBuilder