You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a pass to convert rank-0 tensor to rank-1 tensor (#8298)
Summary:
Test with following code, and no long see the error/warning to complain rank-0 tensor
```
class Model(torch.nn.Module):
def forward(self, x, y):
return x + y
model = Model()
model.eval()
example_inputs = (torch.tensor(1.0), torch.tensor(2.0))
exported_program_manager_aten = torch.export.export(model, example_inputs)
exported_program_manager_edge = executorch.exir.to_edge(
exported_program_manager_aten
).transform([Rank0ToRank1Pass()])
delegated_module = to_backend(
CoreMLBackend.__name__, exported_program_manager_edge.exported_program(), []
)
```
Differential Revision: D69281867
0 commit comments