Skip to content

Commit

Permalink
Don't use wrap_fx_proxy_cls for wrap_symint (#125494)
Browse files Browse the repository at this point in the history
We use very little of the code in wrap_fx_proxy_cls, so dupe it out.

Signed-off-by: Edward Z. Yang <[email protected]>

Pull Request resolved: #125494
Approved by: https://github.com/lezcano
ghstack dependencies: #125395, #125419, #125483
  • Loading branch information
ezyang authored and pytorchmergebot committed May 5, 2024
1 parent 617e473 commit 12da7ee
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions torch/_dynamo/variables/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1389,13 +1389,8 @@ def wrap_symint(self, value):
source=self.get_source(),
)

unspec_var = wrap_fx_proxy_cls(
SymNodeVariable, # NB: this doesn't actually do anything
tx=self.tx,
proxy=proxy,
example_value=wrapped_value,
**options,
)
set_example_value(proxy.node, wrapped_value)
unspec_var = SymNodeVariable(proxy, wrapped_value, **options)
self.tx.output.unspec_variable_map[self.name] = unspec_var

if not is_constant_source(self.get_source()):
Expand Down

0 comments on commit 12da7ee

Please sign in to comment.