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
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
Cyril Moineau
aidge_core
Commits
f4e3787d
Commit
f4e3787d
authored
1 year ago
by
Cyril Moineau
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] MetaOperator output was badly linked to its children.
parent
c3075b91
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/aidge/operator/MetaOperator.hpp
+0
-6
0 additions, 6 deletions
include/aidge/operator/MetaOperator.hpp
src/operator/MetaOperator.cpp
+9
-6
9 additions, 6 deletions
src/operator/MetaOperator.cpp
with
9 additions
and
12 deletions
include/aidge/operator/MetaOperator.hpp
+
0
−
6
View file @
f4e3787d
...
...
@@ -78,12 +78,6 @@ public:
void
computeOutputDims
()
override
final
{
// Forward dims of micro-graph
mGraph
->
forwardDims
();
// Associate outputs to micro-graph outputs for custom implementation
for
(
size_t
outputIdx
=
0
;
outputIdx
<
mOutputOps
.
size
();
++
outputIdx
)
{
const
auto
&
outputOp
=
mOutputOps
[
outputIdx
];
mOutputs
[
outputIdx
]
=
outputOp
.
first
->
getOutput
(
outputOp
.
second
);
}
}
bool
outputDimsForwarded
()
const
override
final
{
return
!
(
mOutputs
[
0
]
->
empty
());
}
...
...
This diff is collapsed.
Click to expand it.
src/operator/MetaOperator.cpp
+
9
−
6
View file @
f4e3787d
...
...
@@ -22,10 +22,6 @@ Aidge::MetaOperator_Op::MetaOperator_Op(const char *type, const std::shared_ptr<
for
(
std
::
size_t
i
=
0
;
i
<
mInputs
.
size
();
++
i
)
{
mInputs
[
i
]
=
std
::
make_shared
<
Tensor
>
();
}
mOutputs
=
std
::
vector
<
std
::
shared_ptr
<
Tensor
>>
(
mGraph
->
outputs
().
size
());
for
(
std
::
size_t
i
=
0
;
i
<
mOutputs
.
size
();
++
i
)
{
mOutputs
[
i
]
=
std
::
make_shared
<
Tensor
>
();
}
// Fill inputsNodes and outputsNodes when there is no ambiguity
if
(
inputNodes
.
empty
())
{
...
...
@@ -46,7 +42,7 @@ Aidge::MetaOperator_Op::MetaOperator_Op(const char *type, const std::shared_ptr<
AIDGE_ASSERT
(
mGraph
->
inView
(
inputNode
),
"input node must be in the graph"
);
const
std
::
vector
<
std
::
pair
<
std
::
shared_ptr
<
Node
>
,
IOIndex_t
>>
inputNodeinputs
=
inputNode
->
inputs
();
int
inputIdx
=
0
;
// input idx relative to the current node
for
(
const
auto
&
in
:
inputNodeinputs
)
{
if
(
in
.
first
==
nullptr
||
!
mGraph
->
inView
(
in
.
first
))
{
...
...
@@ -71,8 +67,15 @@ Aidge::MetaOperator_Op::MetaOperator_Op(const char *type, const std::shared_ptr<
}
}
AIDGE_INTERNAL_ASSERT
(
mInputOps
.
size
()
==
mGraph
->
inputs
().
size
());
AIDGE_INTERNAL_ASSERT
(
mOutputOps
.
size
()
==
mGraph
->
outputs
().
size
());
mOutputs
=
std
::
vector
<
std
::
shared_ptr
<
Tensor
>>
(
mGraph
->
outputs
().
size
());
// Associate outputs to micro-graph outputs for custom implementation
for
(
size_t
outputIdx
=
0
;
outputIdx
<
mOutputOps
.
size
();
++
outputIdx
)
{
const
auto
&
outputOp
=
mOutputOps
[
outputIdx
];
mOutputs
[
outputIdx
]
=
outputOp
.
first
->
getOutput
(
outputOp
.
second
);
}
}
Aidge
::
NbElts_t
Aidge
::
MetaOperator_Op
::
getNbRequiredData
(
const
IOIndex_t
inputIdx
)
const
{
...
...
@@ -114,7 +117,7 @@ void Aidge::MetaOperator_Op::updateConsummerProducer() {
// Lazy initialization
mScheduler
=
std
::
make_shared
<
SequentialScheduler
>
(
mGraph
);
}
// TODO: check that generateScheduling() can be called multiple time to iteratively update the schedule.
// It could be a good idea to unify updateConsummerProducer() and generateScheduling() into a "updateScheduling()"
mScheduler
->
generateScheduling
();
...
...
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