(P: MLXProgramBuilder, n: Node)
| 899 | ] |
| 900 | ) |
| 901 | def _view_handler(P: MLXProgramBuilder, n: Node) -> Slot: |
| 902 | args = P.args(n) |
| 903 | require_args(args, 2, 2, "aten.view") |
| 904 | require_kwargs(P.kwargs(n), set(), "aten.view") |
| 905 | x, shape = args |
| 906 | out = P.make_or_get_slot(n) |
| 907 | |
| 908 | shape_iovs = [P.to_int_or_vid(s) for s in shape] |
| 909 | P.emit( |
| 910 | ReshapeNode( |
| 911 | x=P.slot_to_tid(x), |
| 912 | out=P.slot_to_tid(out), |
| 913 | shape=shape_iovs, |
| 914 | ) |
| 915 | ) |
| 916 | return out |
| 917 | |
| 918 | |
| 919 | @REGISTRY.register( |
nothing calls this directly
no test coverage detected