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

dialects: stencil: Allow loading and storing from a same field. #3071

Merged
merged 7 commits into from
Aug 21, 2024

Conversation

PapyChacal
Copy link
Collaborator

Now that stencil-bufferize can deal with those cases, lift this restriction at the stencil dialect level.
Keep the check in the specific old conversion patterns still assuming this property for least surprise. Point user to use stencil-bufferize, which if successful makes those operations disappear.

@PapyChacal PapyChacal added dialects Changes on the dialects transformations Changes or adds a transformatio labels Aug 20, 2024
@PapyChacal PapyChacal self-assigned this Aug 20, 2024
@PapyChacal PapyChacal changed the title dialects: stencil: Allow loading and sotring from a same field. dialects: stencil: Allow loading and storing from a same field. Aug 20, 2024
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.90%. Comparing base (600dd91) to head (4d35c83).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3071      +/-   ##
==========================================
- Coverage   89.90%   89.90%   -0.01%     
==========================================
  Files         418      418              
  Lines       52913    52898      -15     
  Branches     8202     8200       -2     
==========================================
- Hits        47571    47556      -15     
  Misses       4015     4015              
  Partials     1327     1327              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PapyChacal PapyChacal marked this pull request as ready for review August 20, 2024 14:53

// CHECK: "stencil.store"(%2, %0) {"bounds" = #stencil.bounds<[0, 0, 0], [64, 64, 64]>} : (!stencil.temp<[0,64]x[0,64]x[0,64]xindex>, !stencil.field<[0,64]x[0,64]x[0,64]xindex>) -> ()
// CHECK-NEXT: ^^^^^^^^^^^^^^^-------------------------------------------------------------------------------------------------------------------------
// CHECK-NEXT: | Error while applying pattern: Cannot lower directly if storing to the same field multiple times! Try running `stencil-bufferize` before.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so, we still keep this, as expected

Copy link
Collaborator Author

@PapyChacal PapyChacal Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda, as a transition; This is now only an error to try and use the old lowering on such a case!
So you can now express it without hacks, and in most cases lower it simply by first running stencil-bufferize

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Where before, it was considered an error to just write it!)

@PapyChacal PapyChacal merged commit bd700e9 into main Aug 21, 2024
14 checks passed
@PapyChacal PapyChacal deleted the emilien/stencil-load-store branch August 21, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants