/external/pytorch/torch/csrc/autograd/ |
D | python_saved_variable_hooks.cpp | 13 py::function& unpack_hook) in PySavedVariableHooks() argument 16 unpack_hook_(unpack_hook.release().ptr()) {} in PySavedVariableHooks() 62 py::function& unpack_hook) { in push_hooks() argument 66 c10::SafePyObject(unpack_hook.release().ptr(), getPyInterpreter())); in push_hooks() 70 auto [pack_hook, unpack_hook] = at::SavedTensorDefaultHooks::pop_hooks(); in pop_hooks() 73 unpack_hook.ptr(getPyInterpreter()) != nullptr); in pop_hooks() 81 auto [pack_hook, unpack_hook] = *out; in get_hooks() 86 py::reinterpret_steal<py::function>(unpack_hook.release()); in get_hooks()
|
D | python_saved_variable_hooks.h | 16 PySavedVariableHooks(py::function& pack_hook, py::function& unpack_hook); 28 static void push_hooks(py::function& pack_hook, py::function& unpack_hook);
|
D | init.cpp | 427 [](py::function& pack_hook, py::function& unpack_hook) { in THPAutograd_initExtension() argument 429 pack_hook, unpack_hook); in THPAutograd_initExtension() 522 py::function& unpack_hook) { in THPAutograd_initExtension() argument 527 pack_hook, unpack_hook)); in THPAutograd_initExtension()
|
/external/pytorch/torch/autograd/ |
D | graph.py | 273 unpack_hook: Callable[[Any], torch.Tensor], 276 self.unpack_hook = unpack_hook 280 self.pack_hook, self.unpack_hook 596 def unpack_hook(tup): function 610 super().__init__(pack_hook, unpack_hook)
|
/external/pytorch/aten/src/ATen/ |
D | SavedTensorHooks.cpp | 61 void SavedTensorDefaultHooks::push_hooks(SafePyObject pack_hook, SafePyObject unpack_hook) { in push_hooks() argument 64 tls.stack.emplace(std::move(pack_hook), std::move(unpack_hook)); in push_hooks()
|
D | SavedTensorHooks.h | 36 c10::SafePyObject unpack_hook);
|
/external/pytorch/torch/utils/ |
D | checkpoint.py | 1091 def unpack_hook(x): function 1096 super().__init__(pack_hook, unpack_hook) 1111 def unpack_hook(holder): function 1147 return unpack_hook(holder) 1152 super().__init__(pack_hook, unpack_hook)
|
/external/pytorch/docs/source/notes/ |
D | autograd.rst | 703 <saved-tensors-doc>` by defining a pair of ``pack_hook`` / ``unpack_hook`` 706 string containing a filename). The ``unpack_hook`` function takes as its single 708 the backward pass. The tensor returned by ``unpack_hook`` only needs to have 729 def unpack_hook(temp_file): 732 Notice that the ``unpack_hook`` should not delete the temporary file because it 740 We guarantee that ``pack_hook`` will only be called once but ``unpack_hook`` can 764 y.grad_fn._raw_saved_self.register_hooks(pack_hook, unpack_hook) 767 The ``unpack_hook`` method is called each time the saved tensor needs to be 801 def unpack_hook(tensor_or_sctf): 808 with torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook): [all …]
|
/external/pytorch/torch/_C/ |
D | _autograd.pyi | 115 unpack_hook: Callable[[Any], torch.Tensor],
|
D | __init__.pyi.in | 1330 def _register_default_hooks(pack_hook: Callable, unpack_hook: Callable) -> None: ...
|
/external/pytorch/test/distributed/fsdp/ |
D | test_checkpoint_wrapper.py | 354 saved_tensor_hook_obj.unpack_hook = testing_cpu_offload_unpack_hook
|
/external/pytorch/test/inductor/ |
D | test_compiled_autograd.py | 2648 def unpack_hook(x): function 2661 pack_hook, unpack_hook
|
/external/pytorch/test/ |
D | test_autograd.py | 9523 def unpack_hook(x): function 9526 super().__init__(lambda x: x, unpack_hook) 9573 def unpack_hook(x): function 9580 with torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook): 9609 def unpack_hook(x): function 9612 with torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook):
|
/external/pytorch/test/dynamo/ |
D | test_repros.py | 1097 def unpack_hook(x): function 1104 with torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook):
|