Change _generate_new_graph_signature (#206)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/206 X-link: https://github.com/pytorch/pytorch/pull/108571 Previously `_generate_new_graph_signature` had the assumption that all transformations were not in place. However, this is an incorrect assumption leading to mysterious failures when running passes doing in-place modifications. This function is technically only needed in the case where the user output node or user input node name is changed. For example, if the user output node was "add" but a pass changes all the "add"s to "mul"s, then the output node will now be named "mul", which we have to update. For cases where users change the number of user inputs/outputs, number of parameters/buffers, or the names of parameters/buffers it will require extra work on the user's side to update the graph signature, since there is no automatic way for us to detect where to put what. Note: this doesn't actually change the names for the buffers_to_mutate part of the graph signature, but we're going to assume this is rare, because implementing auto-fixing for that is a little hard... Reviewed By: digantdesai Differential Revision: D48917505 fbshipit-source-id: 775792bf053290ef5af3dacaf95359a071026163
A
Angela Yi committed
f3c4edc5ac0ecd9b70ab978b95a64d1c3409cdce
Parent: f5796c7
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/6/2023, 9:30:00 PM