Bugfix for the strided copy + add some assertions.

This commit is contained in:
laurent
2023-06-23 16:28:18 +01:00
parent bcfbb1dca1
commit 1936a1f0a3
3 changed files with 7 additions and 1 deletions

View File

@ -668,7 +668,7 @@ impl Tensor {
let shape = self.shape();
let mut storage = self.device().zeros(shape, self.dtype())?;
self.storage
.copy_strided_src(&mut storage, shape, &self.stride, 0)?;
.copy_strided_src(&mut storage, &self.shape, &self.stride, 0)?;
let tensor_ = Tensor_ {
id: TensorId::new(),
storage,