-
Notifications
You must be signed in to change notification settings - Fork 77
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
Conversation
Created layout loops and added params
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
Still doesn't verify though, `scf.for` needs fixing
* Add `scf.yield` to the end. * Remove `iter_args` * Use `i16` as the loop counter
csl_wrapper
to csl
modules
csl_wrapper
to csl
modulescsl_wrapper
to csl
modules
assert isa(yield_op := op.layout_module.block.last_op, csl_wrapper.YieldOp) | ||
rewriter.erase_op(yield_op) | ||
|
||
with ImplicitBuilder(module_block): |
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.
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.
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.
Transforming
csl_wrapper
to the twocsl.module
s