Skip to content

Commit 6215fa5

Browse files
committed
update write lock
1 parent a7ac431 commit 6215fa5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

candle-core/src/custom_op.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ impl Tensor {
363363
// Same storage: acquire single write lock
364364
let mut storage = self.storage.write()
365365
.map_err(|_| Error::msg("Lock poisoned"))?;
366+
self.storage_mut().inplace_op2_same_storage(
367+
self.layout(),
368+
rhs.layout(),
369+
c
370+
)
366371
} else {
367372
self.storage_mut()
368373
.inplace_op2(self.layout(), &rhs.storage(), rhs.layout(), c)

0 commit comments

Comments
 (0)