Skip to content

Commit

Permalink
tests: Check operation count in tti adjoint
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed May 3, 2021
1 parent f0d49c2 commit ee22a3e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_dse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2519,6 +2519,17 @@ def test_opcounts(self, space_order, expected):
sections = list(op.op_fwd()._profiler._sections.values())
assert sections[1].sops == expected

@switchconfig(profiling='advanced')
@pytest.mark.parametrize('space_order,expected', [
(4, 111),
])
def test_opcounts_adjoint(self, space_order, expected):
wavesolver = self.tti_operator(opt='advanced')
op = wavesolver.op_adj()

assert op._profiler._sections['section1'].sops == expected
assert len([i for i in FindSymbols().visit(op) if i.is_Array]) == 7


class TestTTIv2(object):

Expand Down

0 comments on commit ee22a3e

Please sign in to comment.