Skip to content
Snippets Groups Projects
Commit fef04ada authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Transform] exclude input fifos from RemoveShallowFIFOs

parent 9f35779a
No related branches found
No related tags found
No related merge requests found
......@@ -87,9 +87,14 @@ class RemoveShallowFIFOs(Transformation):
def apply(self, model):
shallow_fifos = []
for node in model.graph.node:
if len(node.input) > 0:
is_first_node = model.find_producer(node.input[0]) is None
else:
is_first_node = True
if (
node.op_type == "StreamingFIFO"
and getCustomOp(node).get_nodeattr("depth") <= self.shallow_threshold
and (not is_first_node)
):
# bypass shallow fifos
shallow_fifos.append(node)
......
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