-
Notifications
You must be signed in to change notification settings - Fork 84
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
Avoid BoundSymbol repeating itself in its subsymbols after functionalization #802
Conversation
a5bf901
to
4777056
Compare
4777056
to
f9c5120
Compare
@@ -848,6 +848,12 @@ def computation(x): | |||
new_bsyms.append(new_functional_bsym) | |||
bsym_inplace_to_functional[new_bsym] = new_functional_bsym | |||
|
|||
if ( | |||
len(new_functional_bsym.subsymbols) == 1 | |||
and new_functional_bsym.rhs == new_functional_bsym.subsymbols[0].rhs |
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.
Could you please explain why name/id/other description not involving explicit construction of BoundSymbolRHS
is not sufficient? My rationale: I am biased in favor of using as less of hash(BoundSymbol...)
as possible...
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 might be just paranoid but I want to make sure args/kwargs are the same, not only sym
of them.
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! Thank you, @crcrpar ! Do not want to block you any longer :)
f9c5120
to
7703887
Compare
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
Co-authored-by: nikitaved <nikitaved@users.noreply.github.com> Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
7703887
to
fe97811
Compare
Thank you @crcrpar @nikitaved |
What does this PR do?
Fixes #801.
For some in-place ops, functionalization would create a new boundsymbol whose first subsymbol is identical. As in the linked issue, this redundant nest seems to bother nvfuser region creation. This PR adds a simple check and edit to avoid such situation.