Skip to content
Snippets Groups Projects
Commit c82911a5 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Fix issue with return value of constantShapeFolding

parent 61163dbf
No related branches found
No related tags found
1 merge request!297Reshape forward dims
......@@ -24,6 +24,7 @@ bool Aidge::constantShapeFolding(std::shared_ptr<GraphView> graph, const std::ve
bool modified = false;
bool forwarded = false;
bool not_shape_present = true;
bool was_modified = false;
for (auto nodePtr: graph->getNodes())
not_shape_present &= (nodePtr->type() != Shape_Op::Type);
if (not_shape_present)
......@@ -31,10 +32,11 @@ bool Aidge::constantShapeFolding(std::shared_ptr<GraphView> graph, const std::ve
do{
forwarded = graph->forwardDims(dims, true);
modified = constantFolding(graph, true);
was_modified = true;
} while(modified);
if (!forwarded){
Log::warn("Failed to forward GraphView.");
}
return modified;
return was_modified;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment