Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_core
Commits
8aa8f001
Commit
8aa8f001
authored
1 year ago
by
Vincent Templier
Browse files
Options
Downloads
Patches
Plain Diff
Add getParent method to Node class
parent
6b2df066
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/aidge/graph/Node.hpp
+1
-1
1 addition, 1 deletion
include/aidge/graph/Node.hpp
src/graph/GraphView.cpp
+1
-1
1 addition, 1 deletion
src/graph/GraphView.cpp
src/graph/Node.cpp
+1
-1
1 addition, 1 deletion
src/graph/Node.cpp
src/recipies/FuseMulAdd.cpp
+5
-5
5 additions, 5 deletions
src/recipies/FuseMulAdd.cpp
with
8 additions
and
8 deletions
include/aidge/graph/Node.hpp
+
1
−
1
View file @
8aa8f001
...
...
@@ -303,7 +303,7 @@ public:
* @param inId Input index.
* @return std::shared_ptr<Node>&
*/
inline
NodePtr
&
getParent
s
(
const
IOIndex_t
inId
)
{
inline
NodePtr
&
getParent
(
const
IOIndex_t
inId
)
{
assert
(
inId
!=
gk_IODefaultIndex
);
return
mParents
.
at
(
inId
);
}
...
...
This diff is collapsed.
Click to expand it.
src/graph/GraphView.cpp
+
1
−
1
View file @
8aa8f001
...
...
@@ -326,7 +326,7 @@ void Aidge::GraphView::add(std::shared_ptr<Node> node, bool includeLearnablePara
// add learnable parameters to the graph
if
(
includeLearnableParam
)
{
for
(
IOIndex_t
i
=
node
->
nbDataInputs
();
i
<
node
->
nbInputs
();
++
i
)
{
std
::
shared_ptr
<
Node
>
parentNode
=
node
->
getParent
s
(
static_cast
<
IOIndex_t
>
(
i
));
std
::
shared_ptr
<
Node
>
parentNode
=
node
->
getParent
(
static_cast
<
IOIndex_t
>
(
i
));
if
(
parentNode
)
{
parentNode
->
addView
(
shared_from_this
());
mNodes
.
insert
(
parentNode
);
...
...
This diff is collapsed.
Click to expand it.
src/graph/Node.cpp
+
1
−
1
View file @
8aa8f001
...
...
@@ -226,7 +226,7 @@ void Aidge::Node::addChild(std::shared_ptr<GraphView> otherView, const IOIndex_t
}
void
Aidge
::
Node
::
addParent
(
const
std
::
shared_ptr
<
Node
>
other_node
,
const
IOIndex_t
inId
)
{
if
(
getParent
s
(
inId
)
!=
nullptr
)
{
if
(
getParent
(
inId
)
!=
nullptr
)
{
printf
(
"Warning, you're replacing a Parent.
\n
"
);
}
assert
((
inId
!=
gk_IODefaultIndex
)
&&
(
inId
<
nbInputs
())
&&
"Input index out of bound."
);
...
...
This diff is collapsed.
Click to expand it.
src/recipies/FuseMulAdd.cpp
+
5
−
5
View file @
8aa8f001
...
...
@@ -59,12 +59,12 @@ void Aidge::fuseMulAdd(std::set<std::shared_ptr<Node>> nodes){
// Step 2 : Branch existing producers & create the others
// link weights & bias
if
(
matmul
->
getParent
s
(
1
)
==
nullptr
)
{
matmul
->
getParent
s
(
0
)
->
addChild
(
fc
,
0
,
1
);
if
(
matmul
->
getParent
(
1
)
==
nullptr
)
{
matmul
->
getParent
(
0
)
->
addChild
(
fc
,
0
,
1
);
}
else
{
if
(
matmul
->
getParent
s
(
0
)
!=
nullptr
)
matmul
->
getParent
s
(
0
)
->
addChild
(
fc
,
0
,
0
);
matmul
->
getParent
s
(
1
)
->
addChild
(
fc
,
0
,
1
);
if
(
matmul
->
getParent
(
0
)
!=
nullptr
)
matmul
->
getParent
(
0
)
->
addChild
(
fc
,
0
,
0
);
matmul
->
getParent
(
1
)
->
addChild
(
fc
,
0
,
1
);
}
(
producer_add_bias
.
first
)
->
addChild
(
fc
,
0
,
2
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment