Skip to content

Commit

Permalink
Fix 'get_real_value' on placeholder nodes (#127698)
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/pytorch#127698
Approved by: https://github.com/jansel
ghstack dependencies: #127695, #127696

Reviewed By: clee2000

Differential Revision: D58443884

fbshipit-source-id: 739dc15e745abc83691ee3bae3e29d8fd3bfa44a
  • Loading branch information
BowenBao authored and facebook-github-bot committed Jun 12, 2024
1 parent 2553812 commit c4b0ffc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,6 +1941,9 @@ def get_real_value(node, tracer):
lambda n: get_real_value(n, tracer),
)

if op == "placeholder" and "grapharg" in node.meta:
return node.meta["grapharg"].example

if op == "call_module":
nn_module = tracer.output_graph.nn_modules[node.target]
if not is_lazy_module(nn_module):
Expand Down

0 comments on commit c4b0ffc

Please sign in to comment.