mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
add as_cuda_slice_mut to CudaStorage and CudaDType (#2859)
This commit is contained in:
@ -21,7 +21,9 @@ impl BenchDevice for Device {
|
||||
Device::Cpu => Ok(()),
|
||||
Device::Cuda(device) => {
|
||||
#[cfg(feature = "cuda")]
|
||||
return Ok(device.synchronize()?);
|
||||
return Ok(device
|
||||
.synchronize()
|
||||
.map_err(|e| candle_core::Error::Cuda(Box::new(e)))?);
|
||||
#[cfg(not(feature = "cuda"))]
|
||||
panic!("Cuda device without cuda feature enabled: {:?}", device)
|
||||
}
|
||||
|
Reference in New Issue
Block a user