mirror of
https://github.com/huggingface/candle.git
synced 2025-06-18 11:37:11 +00:00
Bugfix for the strided copy + add some assertions.
This commit is contained in:
@ -182,6 +182,9 @@ impl CpuStorage {
|
||||
src_stride: &[usize],
|
||||
dst_offset: usize,
|
||||
) -> Result<()> {
|
||||
if src_shape.rank() != src_stride.len() {
|
||||
panic!("incoherent shape and strides {src_shape:?} {src_stride:?}")
|
||||
}
|
||||
match (self, dst) {
|
||||
(Self::F32(src), Self::F32(dst)) => {
|
||||
if src_shape.is_contiguous(src_stride) {
|
||||
|
Reference in New Issue
Block a user