mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 11:56:45 +00:00
Preliminary support for inplace ops. (#1921)
* Preliminary support for inplace ops. * Add a test.
This commit is contained in:
@ -2254,6 +2254,10 @@ impl Tensor {
|
||||
self.storage.read().unwrap()
|
||||
}
|
||||
|
||||
pub(crate) fn storage_mut(&self) -> std::sync::RwLockWriteGuard<'_, Storage> {
|
||||
self.storage.write().unwrap()
|
||||
}
|
||||
|
||||
// If we extend the visibility of this function to be usable outside of this crate, we should
|
||||
// make it unsafe.
|
||||
pub(crate) fn storage_mut_and_layout(
|
||||
|
Reference in New Issue
Block a user