Handle aten.copy - copy data from src to self. Schema: aten::copy(Tensor self, Tensor src, bool non_blocking=False) -> Tensor In functionalized Edge IR, this returns a copy of src (args[1]).
(P: MLXProgramBuilder, n: Node)
| 945 | |
| 946 | @REGISTRY.register(target=[torch.ops.aten.copy.default]) |
| 947 | def _copy_handler(P: MLXProgramBuilder, n: Node) -> Slot: |
| 948 | """Handle aten.copy - copy data from src to self. |
| 949 | |
| 950 | Schema: aten::copy(Tensor self, Tensor src, bool non_blocking=False) -> Tensor |
| 951 | In functionalized Edge IR, this returns a copy of src (args[1]). |
| 952 | """ |
| 953 | args = P.args(n) |
| 954 | require_args(args, 2, 2, "aten.copy") |
| 955 | require_kwargs(P.kwargs(n), {"non_blocking"}, "aten.copy") |
| 956 | src = args[1] |
| 957 | out = P.make_or_get_slot(n) |
| 958 | P.emit( |
| 959 | ContiguousNode( |
| 960 | x=P.slot_to_tid(src), |
| 961 | out=P.slot_to_tid(out), |
| 962 | ) |
| 963 | ) |
| 964 | return out |
| 965 | |
| 966 | |
| 967 | @REGISTRY.register(target=[exir_ops.edge.dim_order_ops._clone_dim_order.default]) |
nothing calls this directly
no test coverage detected