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 b4d72f1 commit f83f99dCopy full SHA for f83f99d
exir/program/_program.py
@@ -97,6 +97,7 @@
97
from torch.fx._compatibility import compatibility
98
from torch.fx.passes.infra.pass_manager import PassManager
99
from torch.utils import _pytree as pytree
100
+from torch._export.utils import _detect_fake_mode_from_gm
101
102
Val = Any
103
@@ -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