Skip to content
Open
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
4 changes: 3 additions & 1 deletion exir/program/_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
get_aten_verifier,
)
from torch._export.passes import ReplaceViewOpsWithViewCopyOpsPass
from torch._export.utils import _detect_fake_mode_from_gm
from torch._export.verifier import Verifier
from torch.export import ExportedProgram
from torch.export._remove_auto_functionalized_pass import (
Expand Down Expand Up @@ -333,7 +334,8 @@ def lift_constant_tensor_pass(ep):
graph_signature = ep.graph_signature
buffers = list(graph_signature.buffers)

fake_mode = list(ep.graph.nodes)[0].meta["val"].fake_mode
fake_mode = _detect_fake_mode_from_gm(ep.graph_module)

first_user_input = None
lifted_constants = []
for node in ep.graph.nodes:
Expand Down
Loading