ConstructFromInputs
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/graph.h>
- Library file: libgraph.so
Function Usage
Generates a graph object based on a user-constructed operator object.
The function is the same as that of SetInputs. SetInputs will be deprecated in future releases. Use this API instead.
Prototype
1 | static GraphPtr ConstructFromInputs(const std::vector<Operator> &inputs, const AscendString &name) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
inputs |
Input |
Operator input of the entire graph. |
name |
Input |
Graph name. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
GraphPtr |
Graph pointer, which returns the newly constructed graph. |
Restrictions
None
Examples
1 2 3 | GraphPtr graph; graph = Graph::ConstructFromInputs(inputs, graph_name); graph->SetOutputs(outputs); |
Parent topic: Graph