Add some skeleton code for GPU support.

This commit is contained in:
laurent
2023-06-21 09:13:57 +01:00
parent f319583530
commit 8cde0c5478
3 changed files with 28 additions and 0 deletions

View File

@ -209,6 +209,7 @@ impl Tensor {
let data = S::cpu_storage_as_slice(cpu_storage)?;
Ok(data[0])
}
Storage::Cuda { .. } => todo!(),
}
}
@ -249,6 +250,7 @@ impl Tensor {
let data = S::cpu_storage_as_slice(cpu_storage)?;
Ok(self.strided_index().map(|i| data[i]).collect())
}
Storage::Cuda { .. } => todo!(),
}
}
@ -266,6 +268,7 @@ impl Tensor {
assert!(src_index.next().is_none());
Ok(rows)
}
Storage::Cuda { .. } => todo!(),
}
}