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

transformations: from csl_wrapper to csl modules #3107

Merged
merged 25 commits into from
Sep 2, 2024

Conversation

dk949
Copy link
Collaborator

@dk949 dk949 commented Aug 28, 2024

Transforming csl_wrapper to the two csl.modules

dk949 added 2 commits August 28, 2024 16:56
Created layout loops and added params
@dk949 dk949 added the transformations Changes or adds a transformatio label Aug 28, 2024
@dk949 dk949 requested a review from n-io August 28, 2024 16:01
@dk949 dk949 self-assigned this Aug 28, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.97%. Comparing base (d95e30d) to head (6991981).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3107      +/-   ##
==========================================
+ Coverage   89.94%   89.97%   +0.03%     
==========================================
  Files         425      426       +1     
  Lines       53571    53666      +95     
  Branches     8299     8310      +11     
==========================================
+ Hits        48185    48288     +103     
+ Misses       4044     4035       -9     
- Partials     1342     1343       +1     

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

xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Show resolved Hide resolved
@dk949 dk949 changed the title WIP: (transofrmation): csl-wrapper-to-csl WIP: transformations: from csl_wrapper to csl modules Aug 29, 2024
@dk949 dk949 changed the title WIP: transformations: from csl_wrapper to csl modules transformations: from csl_wrapper to csl modules Aug 29, 2024
@dk949 dk949 marked this pull request as ready for review August 29, 2024 17:01
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
assert isa(yield_op := op.layout_module.block.last_op, csl_wrapper.YieldOp)
rewriter.erase_op(yield_op)

with ImplicitBuilder(module_block):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
with ImplicitBuilder(module_block):
with ImplicitBuilder(module_block := Block()):

Some of these can be inlined, also inner/outer loop block. The block arg types can be passed directly as params.

xdsl/transforms/csl_wrapper_to_csl.py Outdated Show resolved Hide resolved
Both layout module and program module rewrites have been rolled into
one, there is no change to the underlying logic (the `match_and_rewrite`
just got renamed to `lower_layout_module` and `lower_program_module`).

`csl_wrapper.module` is modified in place, hence no need for a cleanup
pass.
Since program module depends on the yield op from the layout region, it
needs to be extracted first.
@dk949 dk949 requested a review from n-io September 2, 2024 16:53
@dk949 dk949 merged commit 9c49c49 into main Sep 2, 2024
14 checks passed
@dk949 dk949 deleted the david/csl-transforms/csl-wrapper-to-csl branch September 2, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants