Do not ignore errors when cloning the storage.

This commit is contained in:
laurent
2023-06-22 16:29:18 +01:00
parent 2f7a072250
commit 7d9a8ff3f9
4 changed files with 27 additions and 4 deletions

View File

@ -441,7 +441,7 @@ impl Tensor {
(stride[n - 2], stride[n - 1]) = (stride[n - 1], stride[n - 2]);
let tensor_ = Tensor_ {
id: TensorId::new(),
storage: self.storage.clone(),
storage: self.storage.try_clone()?,
shape: Shape::from(dims),
stride,
// TODO The op should have a backward