docstr: Handles all operations for the most simple cases automatically with a default gradient
  scaler. Specifically, wraps forward pass in an autocast context, scales loss before
  backward pass, unscales before clipping gradients, uses scaler when stepping
  optimizer(s), and updates scaler afterwards. Do not call ``wrap_scaler`` directly when
  using this method.
  
  PyTorch 1.6 or greater is required for this feature.
docstr_tok: ["Handles","all","operations","for","the","most","simple","cases","automatically","with","a","default","gradient","scaler",".","Specifically",",","wraps","forward","pass","in","an","autocast","context",",","scales","loss","before","backward","pass",",","unscales","before","clipping","gradients",",","uses","scaler","when","stepping","optimizer","(","s",")",",","and","updates","scaler","afterwards",".","Do","not","call","``","wrap_scaler","``","directly","when","using","this","method",".","PyTorch","1.6","or","greater","is","required","for","this","feature","."]
code: def use_amp(self) -> None:
      """
      Handles all operations for the most simple cases automatically with a default gradient
      scaler. Specifically, wraps forward pass in an autocast context, scales loss before
      backward pass, unscales before clipping gradients, uses scaler when stepping
      optimizer(s), and updates scaler afterwards. Do not call ``wrap_scaler`` directly when
      using this method.
  
      PyTorch 1.6 or greater is required for this feature.
      """
      if HAVE_AMP:
          self._parent.wrap_scaler(amp.GradScaler())  # type: ignore
          self._auto_amp = True
  
imports: import logging
  from typing import Any
label_desc: Use image node_id 2 for calling the PyTorchExperimentalContext obj's underlying member method code with example usage: obj.use_amp() without return types