parameters: (*, level=None)
docstring: r"""Function that can be used to exit a forward grad level.
      This function deletes all the gradients associated with this
      level. Only deleting the latest entered level is allowed.
  
      This function also updates the current level that is used by default
      by the other functions in this API.
docstring_summary: r"""Function that can be used to exit a forward grad level.
      This function deletes all the gradients associated with this
      level. Only deleting the latest entered level is allowed.
docstring_tokens: r Function that can be used to exit a forward grad level . This function deletes all the gradients associated with this level . Only deleting the latest entered level is allowed .
function: def exit_dual_level(*, level=None):
      r"""Function that can be used to exit a forward grad level.
      This function deletes all the gradients associated with this
      level. Only deleting the latest entered level is allowed.
  
      This function also updates the current level that is used by default
      by the other functions in this API.
      """
      global _current_level
      if level is None:
          level = _current_level
      if level != _current_level:
          raise RuntimeError("Trying to exit a forward AD level that was not the last one "
                             "that was created. This is not supported.")
      torch._C._exit_dual_level(level=level)
      _current_level = level - 1
function_tokens: def exit_dual_level ( * , level = None ) : global _current_level if level is None : level = _current_level if level != _current_level : raise RuntimeError ( "Trying to exit a forward AD level that was not the last one " "that was created. This is not supported." ) torch . _C . _exit_dual_level ( level = level ) _current_level = level - 1