-
Notifications
You must be signed in to change notification settings - Fork 256
compiler: catch corner case read after write #2909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,10 +9,10 @@ | |
| get_params, skipif | ||
| ) | ||
| from devito import ( # noqa | ||
| NODE, Abs, ConditionalDimension, Constant, DefaultDimension, Derivative, Dimension, | ||
| Eq, Function, Ge, Grid, Inc, Lt, Operator, SparseTimeFunction, SubDimension, | ||
| TimeFunction, configuration, cos, dimensions, div, exp, first_derivative, floor, grad, | ||
| norm, sin, solve, sqrt, switchconfig, transpose | ||
| NODE, Abs, Buffer, ConditionalDimension, Constant, DefaultDimension, Derivative, | ||
| Dimension, Eq, Function, Ge, Grid, Inc, Lt, Operator, SparseTimeFunction, | ||
| SubDimension, TimeFunction, configuration, cos, dimensions, div, exp, | ||
| first_derivative, floor, grad, norm, sin, solve, sqrt, switchconfig, transpose | ||
| ) | ||
| from devito.exceptions import InvalidArgument, InvalidOperator | ||
| from devito.ir import ( | ||
|
|
@@ -58,6 +58,26 @@ def test_scheduling_after_rewrite(): | |
| assert all(trees[1].root.dim is tree.root.dim for tree in trees[1:]) | ||
|
|
||
|
|
||
| def test_scheduling_no_deriv(): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe mention "interpolation" in the name, or it may go underestimated |
||
| grid = Grid((11, 11, 11)) | ||
| x, y, z = grid.dimensions | ||
|
|
||
| image_vs = Function(name='image_vs', grid=grid, space_order=1, staggered=NODE) | ||
| p_back_xy = TimeFunction(name='p_back_xy', grid=grid, staggered=(x, y), | ||
| space_order=4, time_order=1, save=Buffer(1)) | ||
|
|
||
| eqns = [Eq(image_vs, p_back_xy + image_vs), | ||
| Eq(p_back_xy.backward, p_back_xy)] | ||
|
|
||
| op = Operator(eqns) | ||
|
|
||
| assert_structure( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a brief comment explaining why fissioning in x is expected would be useful in the future? |
||
| op, | ||
| ['t,x0_blk0,y0_blk0,x,y,z', 't,x1_blk0,y1_blk0,x,y,z'], | ||
| 'tx0_blk0y0_blk0xyzx1_blk0y1_blk0xyz' | ||
| ) | ||
|
|
||
|
|
||
| @pytest.mark.parametrize('expr,expected', [ | ||
| ('2*fa[x] + fb[x]', '2*fa[x] + fb[x]'), | ||
| ('fa[x]**2', 'fa[x]*fa[x]'), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover, or apply same style change to the other sibling methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually applies the same style as
d_antibelow that has the blank line but can remove blank line from both too if prefered