From bd96f9475b192c78afcba9d921cafe1756004b10 Mon Sep 17 00:00:00 2001 From: Tammam Mustafa Date: Fri, 10 Jun 2022 15:43:21 +0000 Subject: [PATCH] fix bug in parallel pipelines caused by false reporting of fids --- compiler/ir.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compiler/ir.py b/compiler/ir.py index eb32479f4..461fc1b50 100644 --- a/compiler/ir.py +++ b/compiler/ir.py @@ -583,19 +583,20 @@ def combine_common_files(self): ## Returns all the file identifiers in the IR. def all_fids(self): - all_fids = [fid for fid, _from_node, _to_node in self.edges.values()] + all_fids = [fid for fid, from_node, to_node in self.edges.values() + if (from_node is not None or to_node is not None)] return all_fids ## Returns all input fids of the IR def all_input_fids(self): - all_input_fids = [fid for fid, from_node, _to_node in self.edges.values() - if from_node is None] + all_input_fids = [fid for fid, from_node, to_node in self.edges.values() + if from_node is None and to_node is not None] return all_input_fids ## Returns all output fids of the IR def all_output_fids(self): - all_output_fids = [fid for fid, _from_node, to_node in self.edges.values() - if to_node is None] + all_output_fids = [fid for fid, from_node, to_node in self.edges.values() + if to_node is None and from_node is not None] return all_output_fids ## Returns the sources of the IR.