-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wait for #2865] [Subgraph] rename GraphRepresentation
to GraphLayerNodeRepresentation
#2977
base: main
Are you sure you want to change the base?
[Wait for #2865] [Subgraph] rename GraphRepresentation
to GraphLayerNodeRepresentation
#2977
Conversation
…bGraphBase` - Moved the defined behavior from `NetworkGraph` to `SubGraphBase`. - Updated public methods of `NetworkGraph` to pass their behaviors to `SubGraphBase`. - Removed unused private methods in `NetworkGraph`. Signed-off-by: Eunju Yang <[email protected]>
…o SubGraphBase - Update the definition of forwarding operations in neuralnet to be defined within each subgraph type. - Modify the implementation so that both forwarding and incremental_forwarding can now be defined individually for each subgraph type. Signed-off-by: Eunju Yang <[email protected]>
- Update the definition of backwarding operations in neuralnet to be defined within each subgraph type. - `applyGradients` is also updated without taking any callback from outside. Signed-off-by: Eunju Yang <[email protected]>
… tests - Updated `SubGraphBase` to inherit `GraphNode` - Changed the `graph` type inside `NetworkGraph` from `SubGraphBase` to `GraphCore`, using `SubGraphBase` as its `GraphNode` type. - Allowed for the addition of multiple `SubGraphBase` graph nodes in the future. - Assumed that NetworkGraph always has a `default_subgraph` called default_subgraph, and updated the existing code to maintain compatibility. - Updated the relevant unit test codes. Signed-off-by: Eunju Yang <[email protected]>
- Refactored the input and label setup logic for subgraphs by splitting them into separate functions: `setInputs()` and `setLabels()`. - Introduced new functions `setInputs()` and `setLabels()` to handle input and label setups independently for each subgraph. Signed-off-by: Eunju Yang <[email protected]>
…hCpu` - Updated the base class `SubGraphBase` to become a virtual base class and implemented a derived class `SubGraphCpu`. - Set up `NetworkGraph` to default to creating and utilizing one instance of `SubGraphCpu`. - Declared several member functions related to memory management and computation engines as pure virtual functions (=0) in `SubGraphBase`. Signed-off-by: Eunju Yang <[email protected]>
- This commit adds a `graph_scope` property to designate the subgraph, which a layer belongs to. - This commit updates NetworkGraph's addLayer function to check the GraphName of the layer and create a subgraph if the graph doesn't exist. Signed-off-by: Eunju Yang <[email protected]>
- The previous version didn't implement a constructor for subgraph initialization. - This commit resolves the issue. Signed-off-by: Eunju Yang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple change with clear intention!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
nntrainer/compiler/interpreter.h
Outdated
@@ -32,7 +32,7 @@ | |||
* | | deserialize() | |||
* | v | |||
* +-------+--+--------+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a minor detail...
How about changing it like nntrainer/compiler/compiler.h?
nntrainer/nntrainer/compiler/compiler.h
Lines 21 to 35 in 5df2ca0
* | |
* +-----------+---+------------+ | |
* |GraphLayerNodeRepresentation| | |
* +-------+--------------------+ | |
* | ^ | |
* compile() | | | |
* | | | |
* (Compiler) | |
* | | | |
* | | decompile() | |
* v | | |
* +--------+------+ | |
* |ExecutableGraph| | |
* +---------------+ | |
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is updated as you suggested! Thank you for the comment :)
- This commit renames the alias for `GraphRepresentation` to `GraphLayerNodeRepresentation` - The reason we do this is to update the GraphRepresentation as the serialized SubGraphBase pointer, not LayerNode Signed-off-by: Eunju Yang <[email protected]>
5df2ca0
to
d19df9c
Compare
SubGraphBase
/SubGraphCpu
to updateNetworkGraph
; addinggraph_scope
property #2865.GraphRepresentation
toGraphLayerNodeRepresentation
serialized SubGraphBase pointer, not LayerNode
Self evaluation:
Build test: []Passed [ ]Failed [ ]Skipped
Run test: []Passed [ ]Failed [ ]Skipped
Signed-off-by: Eunju Yang [email protected]