latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.autograd.graph API
Functions 2
save_on_cpu
functionFull reference ↗saved_tensors_hooks
functionFull reference ↗- tensorplay.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook)
Context manager that installs a (pack, unpack) pair for every tensor saved via
Function()’ssave_for_backwardwhile active.pack_hook(tensor)runs once per saved tensor at save time and may return any object (e.g. a CPU copy, a key into external storage).unpack_hook(packed)runs whenctx.saved_tensorsreads it back and must return an equivalenttensorplay.Tensor.
If either hook raises, the exception is surfaced from the corresponding operation.
Help improve this page
Found an error, an unclear step, or a missing example?
tensorplay.autograd.gradcheck API
Complete API reference for tensorplay.autograd.gradcheck, including signatures, parameters, examples and members.
tensorplay.autograd.profiler_util API
Complete API reference for tensorplay.autograd.profiler_util, including signatures, parameters, examples and members.

