Refactor to simplify our lives for settings the params in the encoder.

This commit is contained in:
Nicolas Patry
2023-11-10 01:24:49 +01:00
committed by Nicolas Patry
parent 39406a6721
commit df6814f34e
6 changed files with 339 additions and 255 deletions

View File

@ -146,6 +146,7 @@ impl Device {
match (self, rhs) {
(Self::Cpu, Self::Cpu) => true,
(Self::Cuda(lhs), Self::Cuda(rhs)) => lhs.same_device(rhs),
(Self::Metal(lhs), Self::Metal(rhs)) => lhs.same_device(rhs),
_ => false,
}
}