-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[async] Optimization stage 1 #994
Conversation
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.
LGTM!
irpass::typecheck(new_root.get()); | ||
irpass::typecheck(new_root.get(), kernel); |
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.
Actually this pass is probably unnecessary...
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.
...since all ret_type
s are cloned.
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.
Merging this in for now and let's get rid of all kernel parameters and this type check after #988 is done.
// We do not fuse serial kernels for now since they can be SNode accessors | ||
bool are_both_serial = task_a->task_type == OffloadedStmt::serial && | ||
task_b->task_type == OffloadedStmt::serial; | ||
bool same_kernel = task_queue[i].kernel == task_queue[i + 1].kernel; |
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.
BTW, thanks to #915, I realized that kernel fusion has some preconditions.. For example, i don't think clear
and listgen
are easily fusable, because the latter depends on the fact that all threads would observe the result of clear
.
While I don't think this change would fuse those kernels, I'd like to confirm that: kernel fusion would only be done if the later kernel doesn't rely on the kernel boundary being a barrier?
Related issue = #742
[Click here for the format server]