AddControlEdge
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/es_tensor_holder.h>
- Library files: libeager_style_graph_builder_base.so and libeager_style_graph_builder_base_static.a
Function Usage
Connects control edges.
Prototype
1 | Status AddControlEdge(const std::vector<EsTensorHolder> &ctrl_ins) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ctrl_ins |
Input |
Control edge input. Multiple values are supported. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
Status |
GRAPH_SUCCESS(0): success. Other values: failure. |
Constraints
None
Examples
1 2 3 4 5 6 | auto builder = std::make_unique<ge::EsGraphBuilder>("graph"); auto tensor0 = builder->CreateInput(0); auto tensor1 = builder->CreateInput(1); auto tensor2 = builder->CreateInput(2); std::vector<EsTensorHolder> ctrl_ins = {tensor1, tensor2}; (void) tensor0.AddControlEdge(ctrl_ins); // The production node of tensor0 uses the production nodes of tensor1 and tensor2 as the control inputs. |
Parent topic: EsTensorHolder