-
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] [IR] More accurate same_value analysis #2118
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.
Requesting more comments, thanks :)
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.
Thanks for the explanation, LGTM! Would you move some of your replies to the code comments directly?
if (auto global_ptr = global_load->ptr->cast<GlobalPtrStmt>()) { | ||
TI_ASSERT(global_ptr->width() == 1); | ||
if (possibly_modified_states_.count(ir_bank_->get_async_state( | ||
global_ptr->snodes[0], AsyncState::Type::value)) == 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.
IIUC, previous we were too conservative, and returned "not the same" even for snodes that are only read in the tasks?
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.
Yes, exactly.
Related issue = #742 #656
allows passing in a parameter
possibly_modified_states
, so that we can analyze if two global loads share the same value (same if the value state of the SNode is not modified).G2P2G running time on my laptop (fusible now, 1.44x faster!):
before:
after:
one grid:
sync mode:
[Click here for the format server]