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

Function _repeat_handler

backends/mlx/ops.py:1670–1687  ·  view source on GitHub ↗
(P: MLXProgramBuilder, n: Node)

Source from the content-addressed store, hash-verified

1668
1669@REGISTRY.register(target=[torch.ops.aten.repeat.default])
1670def _repeat_handler(P: MLXProgramBuilder, n: Node) -> Slot:
1671 args = P.args(n)
1672 require_args(args, 2, 2, "aten.repeat")
1673 require_kwargs(P.kwargs(n), set(), "aten.repeat")
1674 x, reps = args
1675
1676 # Convert reps to IntOrVid (supports both static ints and dynamic Vids)
1677 reps_int_or_vid = [P.to_int_or_vid(r) for r in reps]
1678
1679 out = P.make_or_get_slot(n)
1680 P.emit(
1681 TileNode(
1682 x=P.slot_to_tid(x),
1683 out=P.slot_to_tid(out),
1684 reps=reps_int_or_vid,
1685 )
1686 )
1687 return out
1688
1689
1690@REGISTRY.register(target=[torch.ops.aten.roll.default])

Callers

nothing calls this directly

Calls 8

require_argsFunction · 0.85
require_kwargsFunction · 0.85
argsMethod · 0.80
kwargsMethod · 0.80
to_int_or_vidMethod · 0.80
emitMethod · 0.80
slot_to_tidMethod · 0.80
make_or_get_slotMethod · 0.45

Tested by

no test coverage detected