From de2625d742be9371757f02513fbb983273319fd2 Mon Sep 17 00:00:00 2001 From: Yidi Wu Date: Wed, 23 Apr 2025 13:23:40 -0700 Subject: [PATCH] always turn on dynamo for map (#150962) Summary: Reland D72896450 Make map consistent with other control flow ops. After the change, map is able to support accessing closures in the map fn. Differential Revision: D73138427 --- exir/tests/control_flow_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exir/tests/control_flow_models.py b/exir/tests/control_flow_models.py index 0815f8fbc5b..7e77de45430 100644 --- a/exir/tests/control_flow_models.py +++ b/exir/tests/control_flow_models.py @@ -87,7 +87,7 @@ def forward(self, xs, y): def f(x, y): return x + y - return torch.ops.higher_order.map(f, xs, y) + xs + return torch._higher_order_ops.map(f, xs, y) + xs def get_random_inputs(self): return torch.rand(2, 4), torch.rand(4)