-
Notifications
You must be signed in to change notification settings - Fork 28
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
Accomodate Seq in bind_expr, fission_after, add_loop, double fission #203
Conversation
src/exo/LoopIR_scheduling.py
Outdated
@@ -1092,7 +1092,7 @@ def map_s(self, s): | |||
|
|||
if isinstance(s, (LoopIR.ForAll, LoopIR.Seq)): | |||
body = self.process_block(s.body) | |||
return [LoopIR.ForAll(s.iter, s.hi, body, s.eff, s.srcinfo)] | |||
return [type(s)(s.iter, s.hi, body, s.eff, s.srcinfo)] |
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.
Use s.update(body=body)
We have a helper for this. Might as well use it. |
src/exo/LoopIR_scheduling.py
Outdated
@@ -2154,17 +2154,17 @@ def map_s(self, s): | |||
# body doesn't depend on the loop | |||
# and the body is idempotent | |||
if s.iter in _FV(pre) or not _is_idempotent(pre): | |||
pre = [LoopIR.ForAll(s.iter, s.hi, pre, None, s.srcinfo)] | |||
pre = [type(s)(s.iter, s.hi, pre, None, s.srcinfo)] |
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.
s.update(body=pre, eff=None)
Hmm isn't this okay? The helper is not used in other parts of this file |
I didn't retroactively replace all of these with the helper, but that doesn't mean we shouldn't use it in new code. |
I'll fix this ASAP! |
No description provided.