Add a synchronize method to devices. (#2055)

* Add a synchronize method to devices.

* Metal version.
This commit is contained in:
Laurent Mazare
2024-04-14 16:32:55 +02:00
committed by GitHub
parent 50e49ecc5f
commit 53e5380bf6
6 changed files with 24 additions and 0 deletions

View File

@ -407,4 +407,9 @@ impl BackendDevice for CudaDevice {
device: self.clone(),
})
}
fn synchronize(&self) -> Result<()> {
self.device.synchronize().map_err(crate::Error::wrap)?;
Ok(())
}
}