-
My understanding of below code is, it uses Lines 186 to 193 in d0dbfe0 What does the "Does not do a deep copy" comment mean? Is there a concept of deep copy in MLX? The |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The comment there just indicates that There is no real "deep copy" in MLX in the sense of an operation which forces a new data buffer to be allocated and copied into. We have no plans to expose one. Data buffers are managed by primitives and the runtime which is at a lower level and having complete control over that is useful. |
Beta Was this translation helpful? Give feedback.
The comment there just indicates that
copy(p, s)
is not going to make a new data buffer to back it's output, it will just be a view of the same data asp
.There is no real "deep copy" in MLX in the sense of an operation which forces a new data buffer to be allocated and copied into. We have no plans to expose one. Data buffers are managed by primitives and the runtime which is at a lower level and having complete control over that is useful.