summaryrefslogtreecommitdiff
path: root/candle-core/src/tensor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'candle-core/src/tensor.rs')
-rw-r--r--candle-core/src/tensor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-core/src/tensor.rs b/candle-core/src/tensor.rs
index f64bd6f2..4b9b3306 100644
--- a/candle-core/src/tensor.rs
+++ b/candle-core/src/tensor.rs
@@ -709,7 +709,7 @@ impl Tensor {
pub fn copy(&self) -> Result<Tensor> {
let tensor_ = Tensor_ {
id: TensorId::new(),
- storage: Arc::new(self.storage.try_clone()?),
+ storage: Arc::new(self.storage.try_clone(self.layout())?),
layout: self.layout.clone(),
op: None, // TODO
is_variable: false,