(P: MLXProgramBuilder, n: Node)
| 1668 | |
| 1669 | @REGISTRY.register(target=[torch.ops.aten.repeat.default]) |
| 1670 | def _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]) |
nothing calls this directly
no test coverage detected