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

Function _conv3d_handler

backends/mlx/ops.py:2446–2458  ·  view source on GitHub ↗

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

(P: MLXProgramBuilder, n: Node)

Source from the content-addressed store, hash-verified

2444
2445@REGISTRY.register(target=[torch.ops.aten.conv3d.default])
2446def _conv3d_handler(P: MLXProgramBuilder, n: Node) -> Slot:
2447 """Handle aten.conv3d: (input, weight, bias, stride, padding, dilation, groups)."""
2448 require_args(n.args, 2, 7, "aten.conv3d")
2449 require_kwargs(P.kwargs(n), set(), "aten.conv3d")
2450 x_node, w_node = n.args[0:2]
2451 bias_node = n.args[2] if len(n.args) > 2 else None
2452 groups = n.args[6] if len(n.args) > 6 else 1
2453 stride = _normalize_conv_param(n.args[3] if len(n.args) > 3 else [1, 1, 1], 3, 1)
2454 padding = _normalize_conv_param(n.args[4] if len(n.args) > 4 else [0, 0, 0], 3, 0)
2455 dilation = _normalize_conv_param(n.args[5] if len(n.args) > 5 else [1, 1, 1], 3, 1)
2456 return _emit_conv(
2457 P, n, x_node, w_node, bias_node, stride, padding, dilation, groups, ndim=3
2458 )
2459
2460
2461def _emit_conv_transpose(

Callers

nothing calls this directly

Calls 5

require_argsFunction · 0.85
require_kwargsFunction · 0.85
_normalize_conv_paramFunction · 0.85
_emit_convFunction · 0.85
kwargsMethod · 0.80

Tested by

no test coverage detected