-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add separate function to apply shared memory indexing #129
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.
Overall looks good/ really nice cleanup! just 1 Q.
write.index = remove_global_indexing( | ||
read.index, tilingConstraints | ||
) | ||
write.index = deepcopy(read.index) |
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.
Why do we need deepcopy
?
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.
So if we just assign read.index to write.index, then when we modify write.index in the corrections pass it will also affect read.index. But did you have a better way to handle 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.
But remove_global_indexing
is already creating a copy, it shouldn't affect original index object.
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, that's right. remove_global_indexing
is creating a copy, but that copy will be assigned to write.index and read.index which is not what we want. If you remove the deepcopy
, two of the lit tests fail.
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.
okay I was able to figure this out. I have removed the deep copy. @Hardcode84 - can you take a look when you get a chance? thanks!
This PR introduces a new function to apply shared memory indexing corrections. Previously, this was being done as part of post expansion. With the new PR, we look at the entire graph holistically and apply indexing changes to reads from shared memory. Signed-off-by: Harsh Menon <harsh@nod-labs.com>
Signed-off-by: Harsh Menon <harsh@nod-labs.com>
593cc79
to
64204c5
Compare
This PR modifies the way the index is being updated so that we allocate a new index whenever the index is being set. Also, rather than overload the write index to also return the register index, we add a separate register_index property for Write nodes. Signed-off-by: Harsh Menon <harsh@nod-labs.com>
64204c5
to
9274b0a
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.
LGTM!
This PR introduces a new function to apply shared
memory indexing corrections. Previously, this was being done as part of post expansion. With the new PR, we look at the entire graph holistically and apply indexing changes to reads from shared memory.