Skip to content

Commit 8fd03e9

Browse files
cccclaifacebook-github-bot
authored andcommitted
exclude mutated buffer
Differential Revision: D55812844
1 parent 1adf268 commit 8fd03e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

exir/backend/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ def tag_constant_data(edge_program: ExportedProgram) -> None:
515515
or is_buffer(edge_program, node)
516516
or is_lifted_tensor_constant(edge_program, node)
517517
):
518+
for node_user in node.users:
519+
if node_user.name in edge_program.graph_signature.buffers_to_mutate:
520+
logging.info(
521+
"The buffer node is a mutated buffer node, which is not constant."
522+
)
523+
continue
518524
user_tags = set()
519525
for user in node.users:
520526
user_tag = user.meta.get("delegation_tag", None)

0 commit comments

Comments
 (0)