Skip to content
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

add the possiblity to load and store from and to the same field #40

Open
gysit opened this issue Aug 30, 2020 · 1 comment
Open

add the possiblity to load and store from and to the same field #40

gysit opened this issue Aug 30, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@gysit
Copy link
Collaborator

gysit commented Aug 30, 2020

sometime it is interesting to load and store from the same field:

  • apply boundary conditions on an input
  • tridiagonal solves
@gysit gysit added the enhancement New feature or request label Aug 30, 2020
@gysit
Copy link
Collaborator Author

gysit commented Aug 31, 2020

An example may be that we want to apply boundary conditions to an input field of the stencil program (in place). It could look as follows:
%0 = stencil.load %in
%1 = stencil.apply boundary
%2 = stencil.apply copy
%3 = stencil.combine 0 -1 %1 plus %2
stencil.store %3 to %in

The idea here is that we verify that the the dependencies of the stencil.combine are all the uses of the input %in. This verification ensure that we have no race conditions when writing to %in. Additionally, we need to ensure we are able to remove the copy stencil if the input and the output field overlap. Alternatively we may also allow the stencil.combine to directly read from an input... or we may enable the stencil combine to have only one operand -> lower the result to multiple kernels

note the stencil combine needs to verify that all its input have one use! that way we ensure that we can allocate an rectangular output for the output of the stencil combine.

this feature is probably a low priority feature for the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant