Expose the synchronize function on the generic device. (#2062)

This commit is contained in:
Laurent Mazare
2024-04-14 23:02:03 +02:00
committed by GitHub
parent db7dbf3071
commit c449f65b12

View File

@ -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(),
}
}
}