diff --git a/src/tensor.rs b/src/tensor.rs index 6f39ea43..c423a448 100644 --- a/src/tensor.rs +++ b/src/tensor.rs @@ -458,7 +458,7 @@ impl SharedTensor { } /// Drops memory allocation on specified device. Returns error - pub fn drop_at(&mut self, device: &DeviceType) -> Result<(), Error> { + pub fn drop_device(&mut self, device: &DeviceType) -> Result<(), Error> { match self.get_location_index(device) { Some(i) => { self.locations.borrow_mut().remove(i); @@ -492,7 +492,7 @@ impl SharedTensor { } /// Errors than can occur when synchronizing memory. -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum Error { /// No copy on source device. MissingSource(&'static str),