@@ -924,6 +924,9 @@ inline void exec_slice_update(
924924 ExecutionState& st,
925925 StreamOrDevice s) {
926926 // When out == dst, use direct assignment to preserve MLX buffer donation.
927+ // TODO: I'm not sure if this is needed as a special case since the standard
928+ // st.set_tensor does a std::move. Keeping for now, but should investigate and
929+ // possibly remove in future.
927930 const bool in_place = (n.out .idx == n.dst .idx );
928931 array& dst = st.tensor_ref (n.dst );
929932 const array& upd = st.const_tensor_ref (n.update );
@@ -1060,6 +1063,10 @@ exec_index_copy(const IndexCopyNode& n, ExecutionState& st, StreamOrDevice s) {
10601063 idx_vec[i] = static_cast <int >(idx);
10611064 }
10621065
1066+ // When out == dst, use direct assignment to preserve MLX buffer donation.
1067+ // TODO: I'm not sure if this is needed as a special case since the standard
1068+ // st.set_tensor does a std::move. Keeping for now, but should investigate and
1069+ // possibly remove in future.
10631070 const bool in_place = (n.out .idx == n.dst .idx );
10641071
10651072 if (idx_vec.empty ()) {
@@ -1995,8 +2002,6 @@ class Interpreter {
19952002 case OpCode::ARG_PARTITION:
19962003 ops::exec_argpartition (std::get<ArgPartitionNode>(instr.node ), st, s);
19972004 break ;
1998- case OpCode::SENTINEL:
1999- break ;
20002005 default :
20012006 throw std::runtime_error (
20022007 " Unknown opcode: " + std::to_string (static_cast <int >(instr.op )));
0 commit comments