Skip to content

Commit

Permalink
Last changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorjackz committed Dec 23, 2024
1 parent e297c9b commit 0597d3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exir/emit/_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,8 @@ def _find_fqn_for_placeholder(
warnings.warn(
"Mutation on a buffer in the model is detected. ExecuTorch assumes "
"buffers that are mutated in the graph have a meaningless initial state, "
"only the shape and dtype will be serialized.",
"only the shape and dtype will be serialized, unless a pass which marks "
"spec.const=True such as InitializedMutableBufferPass is run.",
UserWarning,
stacklevel=1,
)
Expand Down
1 change: 1 addition & 0 deletions exir/passes/init_mutable_pass.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def __init__(self, patterns: List[str]) -> None:
def placeholder(self, name: str, arg, meta):
for pattern in self.patterns:
if pattern in name:
breakpoint()
meta["et_init_buffer"] = True

return super().placeholder(name, arg, meta)

0 comments on commit 0597d3a

Please sign in to comment.