GpuStorage wrap_mlx_array(::mlx::core::array && arr, Dtype dtype)Wrap a caller-owned mlx::core::array into a tracked GpuStorage.
Takes ownership of arr (moves it) and packages it as a
GpuStorage registered with the MemoryTracker. Used by every
op method in GpuBackend to return MLX results back to
Lucid.
Parameters
arrmlx::core::array&&The MLX array to wrap. Moved-from on return.
dtypeDtypeThe Lucid dtype tag to associate with the result (must match
arr's MLX dtype via from_mlx_dtype).Returns
GpuStorageThe wrapped array tracked by Python-side memory accounting.