Skip to content

Commit cd31cf8

Browse files
committed
Update on "Use MetaProxy more pervasively"
[ghstack-poisoned]
1 parent 5ccdcfb commit cd31cf8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

torch/fx/passes/_tensorify_python_scalars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _sympy_interp(expr: sympy.Expr) -> MetaProxy:
119119
# This is guaranteed to be populated by invariant established by
120120
# insert_deferred_runtime_asserts
121121
expr_to_tensor_proxy[expr] = torch.ops.aten.scalar_tensor.default(
122-
expr_to_sym_proxy[expr].node
122+
expr_to_sym_proxy[expr]
123123
)
124124

125125
# cache constants, why not

torch/fx/proxy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,7 @@ def __torch_function__(cls, orig_method, types, args=None, kwargs=None):
561561
*[a.node.meta["val"] if isinstance(a, Proxy) else a for a in args],
562562
**kwargs
563563
)
564-
565-
return MetaProxy(proxy.node, proxy.tracer)
564+
return MetaProxy(proxy.node, proxy.tracer, meta_proxy.fake_mode)
566565

567566
@compatibility(is_backward_compatible=True)
568567
class Attribute(Proxy):

0 commit comments

Comments
 (0)