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: Add stencil features meant for bufferization #2985

Merged
merged 14 commits into from
Aug 5, 2024

Conversation

PapyChacal
Copy link
Collaborator

@PapyChacal PapyChacal commented Aug 5, 2024

  • Add stencil.alloc to allocate a new field
  • Enable a field result on stencil.buffer, meaning "The underlying buffer of the passed values"

Split from:

PapyChacal and others added 8 commits August 5, 2024 10:10
commit 421287a
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Mon Aug 5 10:23:04 2024 +0100

    It's okay pyright

commit 581ae9b
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Mon Aug 5 10:09:26 2024 +0100

    Remove superfluous test.

commit a745623
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Mon Aug 5 10:05:17 2024 +0100

    filecheck readability.

commit e78f970
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Fri Aug 2 14:53:02 2024 +0100

    \o/

commit 5695079
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Thu Jun 27 15:28:52 2024 +0100

    More stuff

commit db70f4d
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Wed Jul 31 11:58:06 2024 +0100

    stencil.apply bufferization.

commit e776933
Author: Emilien Bauer <bauer.emilien@gmail.com>
Date:   Wed Jun 26 18:06:33 2024 +0100

    Implement bufferized stencil conversion.
@PapyChacal PapyChacal added the dialects Changes on the dialects label Aug 5, 2024
@PapyChacal PapyChacal self-assigned this Aug 5, 2024
@PapyChacal PapyChacal changed the title dialects: dialects: Add stencil features meant for bufferization Aug 5, 2024
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.84%. Comparing base (16cc36e) to head (25ef4ef).

Additional details and impacted files
@@                      Coverage Diff                       @@
##           emilien/stencil-bufferized    #2985      +/-   ##
==============================================================
- Coverage                       89.85%   89.84%   -0.02%     
==============================================================
  Files                             409      409              
  Lines                           51217    51252      +35     
  Branches                         7951     7956       +5     
==============================================================
+ Hits                            46023    46046      +23     
- Misses                           3931     3943      +12     
  Partials                         1263     1263              

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

Comment on lines +14 to +19
class AllocUnused(RewritePattern):

@op_type_rewrite_pattern
def match_and_rewrite(self, op: stencil.AllocOp, rewriter: PatternRewriter) -> None:
if not op.field.uses:
rewriter.erase_op(op)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This would be best done through usual DCE with an implementation of side-effect values; but I felt like moving to the application for now.

@PapyChacal PapyChacal marked this pull request as ready for review August 5, 2024 10:44
@PapyChacal PapyChacal requested review from georgebisbas and n-io August 5, 2024 10:44
Base automatically changed from emilien/stencil-bufferized to main August 5, 2024 14:34
@PapyChacal PapyChacal merged commit 63efcfc into main Aug 5, 2024
9 checks passed
@PapyChacal PapyChacal deleted the emilien/stencil-bufferization-dialect branch August 5, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants