We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c00d726 commit 93bf861Copy full SHA for 93bf861
exir/program/_program.py
@@ -80,6 +80,7 @@
80
get_aten_verifier,
81
)
82
from torch._export.passes import ReplaceViewOpsWithViewCopyOpsPass
83
+from torch._export.utils import _detect_fake_mode_from_gm
84
from torch._export.verifier import Verifier
85
from torch.export import ExportedProgram
86
from torch.export._remove_auto_functionalized_pass import (
@@ -333,7 +334,8 @@ def lift_constant_tensor_pass(ep):
333
334
graph_signature = ep.graph_signature
335
buffers = list(graph_signature.buffers)
336
- fake_mode = list(ep.graph.nodes)[0].meta["val"].fake_mode
337
+ fake_mode = _detect_fake_mode_from_gm(ep.graph_module)
338
+
339
first_user_input = None
340
lifted_constants = []
341
for node in ep.graph.nodes:
0 commit comments