Cuda implementation for copying data around.

This commit is contained in:
laurent
2023-06-23 11:18:29 +01:00
parent 79e4b29c2f
commit 1a90f9d3a6
5 changed files with 56 additions and 2 deletions

View File

@ -160,8 +160,8 @@ impl Storage {
(Self::Cpu(src), Self::Cpu(dst)) => {
src.copy_strided_src(dst, src_shape, src_stride, dst_offset)
}
(Self::Cuda(_src), Self::Cuda(_dst)) => {
todo!()
(Self::Cuda(src), Self::Cuda(dst)) => {
Ok(src.copy_strided_src(dst, src_shape, src_stride, dst_offset)?)
}
(lhs, rhs) => Err(Error::DeviceMismatchBinaryOp {
lhs: lhs.device().location(),