Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 27db7a1

Browse files
1e-toetotmeni
andauthored
Fix ParforDiagnostic errors (#137)
Co-authored-by: etotmeni <elena.totmenina@intel.com>
1 parent 0bf83ef commit 27db7a1

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

numba/parfors/parfor.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ def get_parfors_simple(self, print_loop_search):
889889
if print_loop_search:
890890
print_wrapped(fmt % (pf.id, loc, r_pattern))
891891
parfors_simple[pf.id] = (pf, loc, r_pattern)
892-
return parfors_simple
892+
return parfors_simple
893893

894894
def get_all_lines(self, parfors_simple):
895895
# ensure adjacency lists are the same size for both sets of info
@@ -983,6 +983,17 @@ def print_unoptimised(self, lines):
983983
# This prints the unoptimised parfors state
984984
sword = '+--'
985985
fac = len(sword)
986+
fadj, froots = self.compute_graph_info(self.fusion_info)
987+
nadj, _nroots = self.compute_graph_info(self.nested_fusion_info)
988+
989+
if len(fadj) > len(nadj):
990+
lim = len(fadj)
991+
tmp = nadj
992+
else:
993+
lim = len(nadj)
994+
tmp = fadj
995+
for x in range(len(tmp), lim):
996+
tmp.append([])
986997

987998
def print_nest(fadj_, nadj_, theroot, reported, region_id):
988999
def print_g(fadj_, nadj_, nroot, depth):
@@ -1038,6 +1049,17 @@ def print_optimised(self, lines):
10381049
# occurred during loop fusion and rewriting of loop nests
10391050
sword = '+--'
10401051
fac = len(sword)
1052+
fadj, froots = self.compute_graph_info(self.fusion_info)
1053+
nadj, _nroots = self.compute_graph_info(self.nested_fusion_info)
1054+
1055+
if len(fadj) > len(nadj):
1056+
lim = len(fadj)
1057+
tmp = nadj
1058+
else:
1059+
lim = len(nadj)
1060+
tmp = fadj
1061+
for x in range(len(tmp), lim):
1062+
tmp.append([])
10411063

10421064
summary = dict()
10431065
# region : {fused, serialized}

0 commit comments

Comments
 (0)