mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Add torch._lazy_clone
to create COW tensors (#113397)
Part of #109833 Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #113397 Pull Request resolved: https://github.com/pytorch/pytorch/pull/113397 Approved by: https://github.com/ezyang
This commit is contained in:
committed by
PyTorch MergeBot
parent
71343507cd
commit
edec54b9de
@ -442,6 +442,10 @@
|
||||
self: grad
|
||||
result: auto_linear
|
||||
|
||||
- name: _lazy_clone(Tensor self) -> Tensor
|
||||
self: grad
|
||||
result: auto_linear
|
||||
|
||||
- name: _to_copy(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool non_blocking=False, MemoryFormat? memory_format=None) -> Tensor
|
||||
self: _to_copy_backward(grad, self.options())
|
||||
result: _to_copy(self_t, dtype, layout, device, pin_memory, non_blocking, memory_format)
|
||||
|
Reference in New Issue
Block a user