Skip to content

Commit 4846e29

Browse files
dulinrileyfacebook-github-bot
authored andcommitted
Add aten::squeeze and aten::unsqueeze to functionalization (#274)
Summary: `aten::squeeze` and `aten::unsqueeze` only have out variants defined for the functional variants: `squeeze_copy` and `unsqueeze_copy`. Add these to a conversion pass similar to permute and transpose. Reviewed By: jameshegarty Differential Revision: D49171160
1 parent 53fd3b3 commit 4846e29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

exir/passes/replace_broken_ops_with_function_ops_pass.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
torch.ops.aten.view.default: torch.ops.aten.view_copy.default,
2121
torch.ops.aten.expand.default: torch.ops.aten.expand_copy.default,
2222
torch.ops.aten.permute.default: torch.ops.aten.permute_copy.default,
23+
torch.ops.aten.squeeze.default: torch.ops.aten.squeeze_copy.default,
24+
torch.ops.aten.unsqueeze.default: torch.ops.aten.unsqueeze_copy.default,
2325
torch.ops.aten.slice.Tensor: torch.ops.aten.slice_copy.Tensor,
2426
}
2527

0 commit comments

Comments
 (0)