mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 10:26:33 +00:00
Expose the synchronize function on the generic device. (#2062)
This commit is contained in:
@ -337,4 +337,12 @@ impl Device {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn synchronize(&self) -> Result<()> {
|
||||
match self {
|
||||
Self::Cpu => Ok(()),
|
||||
Self::Cuda(d) => d.synchronize(),
|
||||
Self::Metal(d) => d.synchronize(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user