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

Fix ParforDiagnostic errors #137

Merged
merged 1 commit into from
Dec 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion numba/parfors/parfor.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def get_parfors_simple(self, print_loop_search):
if print_loop_search:
print_wrapped(fmt % (pf.id, loc, r_pattern))
parfors_simple[pf.id] = (pf, loc, r_pattern)
return parfors_simple
return parfors_simple

def get_all_lines(self, parfors_simple):
# ensure adjacency lists are the same size for both sets of info
Expand Down Expand Up @@ -983,6 +983,17 @@ def print_unoptimised(self, lines):
# This prints the unoptimised parfors state
sword = '+--'
fac = len(sword)
fadj, froots = self.compute_graph_info(self.fusion_info)
nadj, _nroots = self.compute_graph_info(self.nested_fusion_info)

if len(fadj) > len(nadj):
lim = len(fadj)
tmp = nadj
else:
lim = len(nadj)
tmp = fadj
for x in range(len(tmp), lim):
tmp.append([])

def print_nest(fadj_, nadj_, theroot, reported, region_id):
def print_g(fadj_, nadj_, nroot, depth):
Expand Down Expand Up @@ -1038,6 +1049,17 @@ def print_optimised(self, lines):
# occurred during loop fusion and rewriting of loop nests
sword = '+--'
fac = len(sword)
fadj, froots = self.compute_graph_info(self.fusion_info)
nadj, _nroots = self.compute_graph_info(self.nested_fusion_info)

if len(fadj) > len(nadj):
lim = len(fadj)
tmp = nadj
else:
lim = len(nadj)
tmp = fadj
for x in range(len(tmp), lim):
tmp.append([])

summary = dict()
# region : {fused, serialized}
Expand Down