MCPcopy Create free account
hub / github.com/pytorch/executorch / _conv_transpose3d_handler

Function _conv_transpose3d_handler

backends/mlx/ops.py:2681–2708  ·  view source on GitHub ↗

Handle aten.conv_transpose3d: (input, weight, bias, stride, padding, output_padding, groups, dilation).

(P: MLXProgramBuilder, n: Node)

Source from the content-addressed store, hash-verified

2679
2680@REGISTRY.register(target=[torch.ops.aten.conv_transpose3d.input])
2681def _conv_transpose3d_handler(P: MLXProgramBuilder, n: Node) -> Slot:
2682 """Handle aten.conv_transpose3d: (input, weight, bias, stride, padding, output_padding, groups, dilation)."""
2683 require_args(n.args, 2, 8, "aten.conv_transpose3d")
2684 require_kwargs(P.kwargs(n), set(), "aten.conv_transpose3d")
2685 x_node, w_node = n.args[0:2]
2686 bias_node = n.args[2] if len(n.args) > 2 else None
2687 groups = n.args[6] if len(n.args) > 6 else 1
2688
2689 stride = _normalize_conv_param(n.args[3] if len(n.args) > 3 else [1, 1, 1], 3, 1)
2690 padding = _normalize_conv_param(n.args[4] if len(n.args) > 4 else [0, 0, 0], 3, 0)
2691 output_padding = _normalize_conv_param(
2692 n.args[5] if len(n.args) > 5 else [0, 0, 0], 3, 0
2693 )
2694 dilation = _normalize_conv_param(n.args[7] if len(n.args) > 7 else [1, 1, 1], 3, 1)
2695
2696 return _emit_conv_transpose(
2697 P,
2698 n,
2699 x_node,
2700 w_node,
2701 bias_node,
2702 stride,
2703 padding,
2704 dilation,
2705 output_padding,
2706 groups,
2707 ndim=3,
2708 )
2709
2710
2711@REGISTRY.register(target=[torch.ops.aten.sub.Tensor, torch.ops.aten.sub.Scalar])

Callers

nothing calls this directly

Calls 5

require_argsFunction · 0.85
require_kwargsFunction · 0.85
_normalize_conv_paramFunction · 0.85
_emit_conv_transposeFunction · 0.85
kwargsMethod · 0.80

Tested by

no test coverage detected