Make the cuda rng seedable. (#1056)

This commit is contained in:
Laurent Mazare
2023-10-08 09:32:36 +01:00
committed by GitHub
parent 2e5fb0b251
commit 9abeddd750
4 changed files with 16 additions and 0 deletions

View File

@ -111,4 +111,6 @@ pub trait BackendDevice: Sized + std::fmt::Debug + Clone {
fn rand_uniform(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result<Self::Storage>;
fn rand_normal(&self, _: &Shape, _: DType, _: f64, _: f64) -> Result<Self::Storage>;
fn set_seed(&self, _: u64) -> Result<()>;
}