Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions exir/lowered_backend_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ def _get_new_signature( # noqa: C901

if any(
orig_output_spec.kind == OutputKind.BUFFER_MUTATION
and orig_output_spec.target in new_state_dict
and (
orig_output_spec.target in new_state_dict
or orig_output_spec.target in new_constants
)
for orig_output_spec in orig_output_specs
):
# If the delegate wants to consume the buffer, then the
Expand All @@ -612,7 +615,10 @@ def _get_new_signature( # noqa: C901
orig_output_spec
for orig_output_spec in orig_output_specs
if orig_output_spec.kind == OutputKind.BUFFER_MUTATION
and orig_output_spec.target in new_state_dict
and (
orig_output_spec.target in new_state_dict
or orig_output_spec.target in new_constants
)
][0]

assert len(orig_output_specs) == 1, (
Expand Down
Loading