-
Notifications
You must be signed in to change notification settings - Fork 318
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
[Calyx] LICM after Affine ParallelOp unrolling #8256
base: main
Are you sure you want to change the base?
Conversation
5ae9009
to
1d02ebf
Compare
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.
A few nits and requests.
return | ||
} | ||
} | ||
|
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.
I think a couple more simple unit tests would instill some confidence. Like, does this handle cases where a dependent write occurs after in the affine.for
, e.g.,
affine.parallel 0 to 2 {
%i = affine.for 0 to 8 {
%1 = store 42, %a[%i];
%0 = load %a[0];
...
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.
This example breaks my code, thanks for bringing it up
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.
Can we have a test for this?
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.
Spoke offline; I'll leave this to your discretion.
I've updated the implementation based on the reviews, thanks @cgyurgyik ! |
… the same memref in the parallel regions
This patch does LICM after unrolling
affine.parallel
operations in order to prevent potential memory access contentions.