torch.map
dynamic_shape_map
Original source code:
# mypy: allow-untyped-defs
import torch
Original source code:
# mypy: allow-untyped-defs
import torch
Result:
ExportedProgram:
class GraphModule(torch.nn.Module):
def forward(self, xs: "f32[3, 2]", y: "f32[2]"):
body_graph_0 = self.body_graph_0
map_impl = torch.ops.higher_order.map_impl(body_graph_0, [xs], [y]); body_graph_0 = xs = y = None
getitem: "f32[3, 2]" = map_impl[0]; map_impl = None
return (getitem,)
class body_graph_0(torch.nn.Module):
def forward(self, xs: "f32[2]", y: "f32[2]"):
add: "f32[2]" = torch.ops.aten.add.Tensor(xs, y); xs = y = None
return (add,)
Graph signature:
# inputs
xs: USER_INPUT
y: USER_INPUT
# outputs
getitem: USER_OUTPUT
Range constraints: {}