mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Tensor mutability (#154)
* Working towards tensor mutability. * Use a ref-cell to provide tensor mutability.
This commit is contained in:
@ -50,7 +50,7 @@ enum PyDevice {
|
||||
}
|
||||
|
||||
impl PyDevice {
|
||||
fn from_device(device: Device) -> Self {
|
||||
fn from_device(device: &Device) -> Self {
|
||||
match device {
|
||||
Device::Cpu => Self::Cpu,
|
||||
Device::Cuda(_) => Self::Cuda,
|
||||
|
Reference in New Issue
Block a user