class_docstr: This operator is used to wrap torch.utils.checkpoint. This avoids
  TorchDynamo to look into saved tensor hooks and directly passes the control
  to AOT Autograd, which is ok with tracing saved tensor hooks. As a result of
  AOT tracing torch.utils.checkpoint code, we have a backward graph with
  recomputed forward nodes.
  
  However, we might deprecate this operator soon. The difficulty arises in the
  functionalization of rng ops. Today, there are two different
  functionalization of rng ops - one at AOT autograd and other at Inductor.
  And they are difficult to map to each other. The rng states also complicate
  pattern matching in Inductor. Due to the ease of implementation, we are
  currently inclined towards functionalization at Inductor level, which means
  that duplication/recomputation is done as a compiler pass in the
  partitioners. See TagActivationCheckpoint for more information.
class_docstr_tok: ["This","operator","is","used","to","wrap","torch.utils.checkpoint",".","This","avoids","TorchDynamo","to","look","into","saved","tensor","hooks","and","directly","passes","the","control","to","AOT","Autograd",",","which","is","ok","with","tracing","saved","tensor","hooks",".","As","a","result","of","AOT","tracing","torch.utils.checkpoint","code",",","we","have","a","backward","graph","with","recomputed","forward","nodes",".","However",",","we","might","deprecate","this","operator","soon",".","The","difficulty","arises","in","the","functionalization","of","rng","ops",".","Today",",","there","are","two","different","functionalization","of","rng","ops","-","one","at","AOT","autograd","and","other","at","Inductor",".","And","they","are","difficult","to","map","to","each","other",".","The","rng","states","also","complicate","pattern","matching","in","Inductor",".","Due","to","the","ease","of","implementation",",","we","are","currently","inclined","towards","functionalization","at","Inductor","level",",","which","means","that","duplication\/recomputation","is","done","as","a","compiler","pass","in","the","partitioners",".","See","TagActivationCheckpoint","for","more","information","."]
code: def __init__(self):
      super().__init__("wrap_activation_checkpoint")
  
file_path: pytorch/torch/_higher_order_ops/wrap.py
imports: import inspect
  import logging
  import torch
  from torch._ops import HigherOrderOperator
  from torch.utils.checkpoint import checkpoint, uid
  import torch._dynamo.config
label_desc: Use image node_id 1 to create a new WrapActivationCheckpoint object from inherited base classes: HigherOrderOperator with example: obj = WrapActivationCheckpoint()