[GraphView]: Add getOrderedNodes() method for topological order
Add getOrderedNodes(reversed=false) method which produces a topological order of the graph view (or of the reversed graph view when reversed is true). This order is also deterministic given the nodes set and the ordered output nodes. Cyclic graphs are handled by breaking back edges as declared in the new setBackEdges() method of the Operator class. The order is suitable for resolving constant propagation of tensor types in one pass including for cyclic graphs if back edges are declared correctly for operators. It is also suitable for exporting to onnx graphs which require a topological order of exported acyclic graphs.
parent
f5ed784f
No related branches found
No related tags found
Pipeline #55532 passed
Stage: static_analysis
Stage: build
Stage: test
Stage: coverage
Stage: release
Showing
- aidge_core/unit_tests/test_topological_order.py 67 additions, 0 deletionsaidge_core/unit_tests/test_topological_order.py
- include/aidge/graph/GraphView.hpp 18 additions, 0 deletionsinclude/aidge/graph/GraphView.hpp
- include/aidge/graph/Node.hpp 10 additions, 0 deletionsinclude/aidge/graph/Node.hpp
- include/aidge/operator/Operator.hpp 18 additions, 1 deletioninclude/aidge/operator/Operator.hpp
- python_binding/graph/pybind_GraphView.cpp 4 additions, 0 deletionspython_binding/graph/pybind_GraphView.cpp
- python_binding/operator/pybind_Operator.cpp 2 additions, 0 deletionspython_binding/operator/pybind_Operator.cpp
- src/graph/GraphView.cpp 55 additions, 0 deletionssrc/graph/GraphView.cpp
- src/operator/Memorize.cpp 3 additions, 1 deletionsrc/operator/Memorize.cpp
- unit_tests/graph/Test_GraphView.cpp 104 additions, 0 deletionsunit_tests/graph/Test_GraphView.cpp
Loading
Please register or sign in to comment