From 65c0b7de0bc30d077564c92848b6b492a8798036 Mon Sep 17 00:00:00 2001 From: Jon Chuang <9093549+jon-chuang@users.noreply.github.com> Date: Wed, 25 Oct 2023 11:54:17 -0700 Subject: [PATCH] fix regression which creates a new fake tensor (#111864) Summary: Fixes regression identified here: https://github.com/pytorch/pytorch/pull/111565/files/ccd6b373b5fba81b6141a6b93b2ffb6595dd49ae#r1369334484 Now that `get_fake_value` will identify aliases, we should not try to wrap the fake value again. X-link: https://github.com/pytorch/pytorch/pull/111864 Approved by: https://github.com/eellison Reviewed By: izaitsevfb Differential Revision: D50627345 fbshipit-source-id: a02ae99d1cf523db38f25675a8baa7a853792850 --- userbenchmark/dynamo/dynamobench/_dynamo/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py index 88b33fa28c..7d9d27eab6 100644 --- a/userbenchmark/dynamo/dynamobench/_dynamo/utils.py +++ b/userbenchmark/dynamo/dynamobench/_dynamo/utils.py @@ -1360,7 +1360,7 @@ def get_fake_value(node, tx): op = node.op - # FX Node should always return the same value + # FX Node should always return the same fake value if "example_value" in node.meta and is_fake(node.meta["example_value"]): return node.meta["example_value"]