-
Notifications
You must be signed in to change notification settings - Fork 83
[ SubGraph ] Add createSubGraph API & unittests #3018
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
Closed
EunjuYang
wants to merge
16
commits into
nnstreamer:main
from
EunjuYang:pr/subgraph/unittest_create_subgraph
Closed
[ SubGraph ] Add createSubGraph API & unittests #3018
EunjuYang
wants to merge
16
commits into
nnstreamer:main
from
EunjuYang:pr/subgraph/unittest_create_subgraph
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15375fa
to
6040583
Compare
cae5b51
to
9d71329
Compare
…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]>
- 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]>
- Renamed `GraphName` to `SubGraphName`. - Updated keyword for `SubGraphName` attribute to `subgraph_name` - Made corresponding changes. Signed-off-by: Eunju Yang <[email protected]>
- This commit aims to add an api to create SubGraph object. - To this end, this commit updates some features of SubGraph class including setting up its property. - subgraph.h/.cpp are added to wrap all the subgraph classes. - alias for `GraphRepresentation` and `SubGraphNode` are added. Signed-off-by: Eunju Yang <[email protected]>
…ph handling This commit separates the realize() step from compile() in the neural net module, enabling independent management of the realization process for both inter-subgraphs and intra-subgraphs. Specifically focusing on intra-subgraphs, this commit introduces the implementation of the realize() function. Notable changes include: - Implementation of `addSubGraph` method for `NetworkGraph`. - Addition of a dedicated constructor for `NetworkGraph`, particularly invoked during compilation. This constructor triggers the realize() call. - Relocation of the initial action applying realisers to SubGraphBase to facilitate splitting the realization action across NetworkGraph and SubGraph. - Adding graph_representation and graph_map attributes into the `NeuralNet` class to manage subgraph-level representations effectively. Signed-off-by: Eunju Yang <[email protected]>
In this commit, I've added test cases for the `createSubGraph()` function to ensure the correctness of the `subgraph_name` property. Signed-off-by: Eunju Yang <[email protected]>
- This commit updates createSubGraph APIs - This commit adds subgraph.h as a user interface header - This commit adds `SubGraph` class, which is exposed to outside - This commit updates `SubGraphBase` and `SubGraphCPU` as a merged `SubGraphNode` - This commit adds some codes to link between SubGraph and SubGraphNode - This commit add unittests for subgraph Signed-off-by: Eunju Yang <[email protected]>
- This commit enhances unittest to check equivalence of networks - This commit implements operator== for neuralnet/network_graph/subgraph/graph_core Signed-off-by: Eunju Yang <[email protected]>
- This patch fixes default-graph-related bugs. - This patch update unittests - This patch adds some codes to print `subgraph` info in summarize() Signed-off-by: Eunju Yang <[email protected]>
9d71329
to
f833100
Compare
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days. |
This PR was closed because it has been stalled for 3 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This draft reverts what several previous commits did.
Here're the summary of update in this draft upon the previous PRs:
SubGraph
class, which is exposed to outsideSubGraphBase
andSubGraphCPU
as a mergedSubGraphNode
This is on-going work, but please leave your opinions on this draft.
Self evaluation:
Build test: []Passed [ ]Failed [ ]Skipped
Run test: []Passed [ ]Failed [ ]Skipped
Signed-off-by: Eunju Yang [email protected]