-
Notifications
You must be signed in to change notification settings - Fork 19
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
Implement loop fusion optimization inside kernels #253
Conversation
…looking at loop ranges, fix issue with looking at nodes between loops when the parent is the same, and add initial logic for dependency analysis
…r memory operations fusion
test_loop_fusion.py: Cleaned up format
tests/test_loop_fusion.py
Outdated
for k in range(2): | ||
pk.printf("print 2 %d\n", k) | ||
|
||
def main(): |
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 format these as proper pytests so we can actually run them and have assertions in the end of each workunit?
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.
Looks good except that comment about tests
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.
Provided only comments on tests
loop_fusion_kernels.py: Contains bodies of kernels/tests test_loop_fusion.py: Test class to set environment, run, capture, and compare outputs of kernels
…cilitate fusion of memory ops
…nd on prior operation
…ame too long errors
This PR adds support for doing loop fusion inside a kernel. It can be enabled by setting the
PK_LOOP_FUSE
env variable. The conditions for two loops to be fused are as follows: