diff options
Diffstat (limited to 'candle-core/src/device.rs')
-rw-r--r-- | candle-core/src/device.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/candle-core/src/device.rs b/candle-core/src/device.rs index 1e33021b..9c39d27a 100644 --- a/candle-core/src/device.rs +++ b/candle-core/src/device.rs @@ -294,12 +294,12 @@ impl Device { Device::Cpu => Ok(Storage::Cpu(array.to_cpu_storage())), Device::Cuda(device) => { let storage = array.to_cpu_storage(); - let storage = device.storage_from_cpu_storage(&storage)?; + let storage = device.storage_from_cpu_storage_owned(storage)?; Ok(Storage::Cuda(storage)) } Device::Metal(device) => { let storage = array.to_cpu_storage(); - let storage = device.storage_from_cpu_storage(&storage)?; + let storage = device.storage_from_cpu_storage_owned(storage)?; Ok(Storage::Metal(storage)) } } @@ -310,12 +310,12 @@ impl Device { Device::Cpu => Ok(Storage::Cpu(S::to_cpu_storage_owned(data))), Device::Cuda(device) => { let storage = S::to_cpu_storage_owned(data); - let storage = device.storage_from_cpu_storage(&storage)?; + let storage = device.storage_from_cpu_storage_owned(storage)?; Ok(Storage::Cuda(storage)) } Device::Metal(device) => { let storage = S::to_cpu_storage_owned(data); - let storage = device.storage_from_cpu_storage(&storage)?; + let storage = device.storage_from_cpu_storage_owned(storage)?; Ok(Storage::Metal(storage)) } } |