Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.
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
17 changes: 15 additions & 2 deletions sdc/distributed_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,29 @@ def _analyze_assign(self, inst, array_dists, parfor_dists):
elif isinstance(rhs, ir.Expr) and rhs.op in ('getiter', 'iternext'):
# analyze array container access in pair_first
return

elif isinstance(rhs, ir.Arg):
if rhs.name in self.metadata['distributed']:
distributed_key = 'distributed'
threaded_key = 'threaded'

if distributed_key not in self.metadata.keys():
self.metadata[distributed_key] = {}

if threaded_key not in self.metadata.keys():
self.metadata[threaded_key] = {}

if rhs.name in self.metadata[distributed_key]:
if lhs not in array_dists:
array_dists[lhs] = Distribution.OneD
elif rhs.name in self.metadata['threaded']:

elif rhs.name in self.metadata[threaded_key]:
if lhs not in array_dists:
array_dists[lhs] = Distribution.Thread

else:
dprint("replicated input ", rhs.name, lhs)
self._set_REP([inst.target], array_dists)

else:
self._set_REP(inst.list_vars(), array_dists)
return
Expand Down