(P: MLXProgramBuilder, n: Node)
| 924 | ] |
| 925 | ) |
| 926 | def _clone_handler(P: MLXProgramBuilder, n: Node) -> Slot: |
| 927 | args = P.args(n) |
| 928 | kwargs = P.kwargs(n) |
| 929 | require_args(args, 1, 1, "aten.clone") |
| 930 | require_kwargs(kwargs, {"memory_format"}, "aten.clone") |
| 931 | require_contiguous_format( |
| 932 | memory_format=kwargs.get("memory_format"), |
| 933 | op_name="aten.clone", |
| 934 | ) |
| 935 | (x,) = args |
| 936 | out = P.make_or_get_slot(n) |
| 937 | P.emit( |
| 938 | ContiguousNode( |
| 939 | x=P.slot_to_tid(x), |
| 940 | out=P.slot_to_tid(out), |
| 941 | ) |
| 942 | ) |
| 943 | return out |
| 944 | |
| 945 | |
| 946 | @REGISTRY.register(target=[torch.ops.aten.copy.default]) |
nothing calls this directly
no test coverage detected