mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 19:18:50 +00:00
Bugfix for the strided copy + add some assertions.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user