Skip to content

Avoid directly calling the map operator #10638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions exir/tests/control_flow_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# LICENSE file in the root directory of this source tree.

import torch
from torch._higher_order_ops.map import map as torch_map
from torch.nn import Module # @manual


Expand Down Expand Up @@ -87,7 +88,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_map(f, xs, y) + xs

def get_random_inputs(self):
return torch.rand(2, 4), torch.rand(4)
Expand All @@ -101,7 +102,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_map(f, xs, y) + xs

def get_upper_bound_inputs(self):
return torch.rand(4, 4), torch.rand(4)
Expand Down
Loading