Handle aten.conv_transpose2d: (input, weight, bias, stride, padding, output_padding, groups, dilation).
(P: MLXProgramBuilder, n: Node)
| 2648 | |
| 2649 | @REGISTRY.register(target=[torch.ops.aten.conv_transpose2d.input]) |
| 2650 | def _conv_transpose2d_handler(P: MLXProgramBuilder, n: Node) -> Slot: |
| 2651 | """Handle aten.conv_transpose2d: (input, weight, bias, stride, padding, output_padding, groups, dilation).""" |
| 2652 | require_args(n.args, 2, 8, "aten.conv_transpose2d") |
| 2653 | require_kwargs(P.kwargs(n), set(), "aten.conv_transpose2d") |
| 2654 | x_node, w_node = n.args[0:2] |
| 2655 | bias_node = n.args[2] if len(n.args) > 2 else None |
| 2656 | groups = n.args[6] if len(n.args) > 6 else 1 |
| 2657 | |
| 2658 | stride = _normalize_conv_param(n.args[3] if len(n.args) > 3 else [1, 1], 2, 1) |
| 2659 | padding = _normalize_conv_param(n.args[4] if len(n.args) > 4 else [0, 0], 2, 0) |
| 2660 | output_padding = _normalize_conv_param( |
| 2661 | n.args[5] if len(n.args) > 5 else [0, 0], 2, 0 |
| 2662 | ) |
| 2663 | dilation = _normalize_conv_param(n.args[7] if len(n.args) > 7 else [1, 1], 2, 1) |
| 2664 | |
| 2665 | return _emit_conv_transpose( |
| 2666 | P, |
| 2667 | n, |
| 2668 | x_node, |
| 2669 | w_node, |
| 2670 | bias_node, |
| 2671 | stride, |
| 2672 | padding, |
| 2673 | dilation, |
| 2674 | output_padding, |
| 2675 | groups, |
| 2676 | ndim=2, |
| 2677 | ) |
| 2678 | |
| 2679 | |
| 2680 | @REGISTRY.register(target=[torch.ops.aten.conv_transpose3d.input]) |
nothing calls this directly
no test coverage detected