mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Fixes output donation for IO ops on the GPU (#1857)
This commit is contained in:
committed by
GitHub
parent
0a5215693e
commit
0145911bea
12
mlx/array.h
12
mlx/array.h
@@ -243,6 +243,18 @@ class array {
|
||||
bool col_contiguous : 1;
|
||||
};
|
||||
|
||||
/** Build an array from all the info held by the array description. Including
|
||||
* the buffer, strides, flags.
|
||||
*/
|
||||
explicit array(
|
||||
allocator::Buffer data,
|
||||
Shape shape,
|
||||
Dtype dtype,
|
||||
Strides strides,
|
||||
size_t data_size,
|
||||
Flags flags,
|
||||
Deleter deleter = allocator::free);
|
||||
|
||||
/** The array's primitive. */
|
||||
Primitive& primitive() const {
|
||||
return *(array_desc_->primitive);
|
||||
|
||||
Reference in New Issue
Block a user