Skip to content

Commit de2625d

Browse files
ydwu4facebook-github-bot
authored andcommitted
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
1 parent 0fdc8df commit de2625d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exir/tests/control_flow_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def forward(self, xs, y):
8787
def f(x, y):
8888
return x + y
8989

90-
return torch.ops.higher_order.map(f, xs, y) + xs
90+
return torch._higher_order_ops.map(f, xs, y) + xs
9191

9292
def get_random_inputs(self):
9393
return torch.rand(2, 4), torch.rand(4)

0 commit comments

Comments
 (0)