Skip to content
This repository has been archived by the owner on Oct 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #411 from opesci/drop-partial-ordering
Browse files Browse the repository at this point in the history
Drop partial ordering for loop scheduling
  • Loading branch information
FabioLuporini authored Nov 14, 2017
2 parents bfebd46 + 0282301 commit b1d48cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
11 changes: 1 addition & 10 deletions devito/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from devito.parameters import configuration
from devito.profiling import create_profile
from devito.symbolics import indexify, retrieve_terminals
from devito.tools import as_tuple, filter_sorted, flatten, numpy_to_ctypes, partial_order
from devito.tools import as_tuple, filter_sorted, flatten, numpy_to_ctypes
from devito.types import Object


Expand Down Expand Up @@ -304,12 +304,6 @@ def _schedule_expressions(self, clusters):
"""Create an Iteartion/Expression tree given an iterable of
:class:`Cluster` objects."""

# Topologically sort Iterations
ordering = partial_order([i.stencil.dimensions for i in clusters])
for i, d in enumerate(list(ordering)):
if d.is_Stepping:
ordering.insert(i, d.parent)

# Build the Iteration/Expression tree
processed = []
schedule = OrderedDict()
Expand All @@ -323,9 +317,6 @@ def _schedule_expressions(self, clusters):
root = None
entries = i.stencil.entries

# Reorder based on the globally-established loop ordering
entries = sorted(entries, key=lambda i: ordering.index(i.dim))

# Can I reuse any of the previously scheduled Iterations ?
index = 0
for j0, j1 in zip(entries, list(schedule)):
Expand Down
1 change: 0 additions & 1 deletion tests/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,6 @@ def test_equations_mixed_densedata_timedata(self, shape, dimensions):
op2 = Operator(eqns2, subs=subs, dle='noop')
trees = retrieve_iteration_tree(op2)
assert len(trees) == 2
assert all(trees[0][i] is trees[1][i] for i in range(3))

# Verify both operators produce the same result
op(time=10)
Expand Down

0 comments on commit b1d48cc

Please sign in to comment.