class_docstr: Equivalent to torch.cuda.amp.autocast, but checks device compute capability
  to activate the feature only when the GPU has tensor cores to leverage AMP.
  
  **Attributes:**
  
  * `active` (bool): Whether AMP is currently active. This attribute is at the class
  level
  
  **Usage:**
  
  ```python
  >>> import lightwood.helpers.torch as lt
  >>> with lt.LightwoodAutocast():
  ...     # This code will be executed in AMP mode.
  ...     pass
docstr: * `__enter__()`: Enters the context manager and enables AMP if it is not already enabled.
docstr_tok: ["*","`","__enter__","(",")","`",":","Enters","the","context","manager","and","enables","AMP","if","it","is","not","already","enabled","."]
code: def __enter__(self):
      """
      * `__enter__()`: Enters the context manager and enables AMP if it is not already enabled.
      """
      if self._enabled:
          self.prev = torch.is_autocast_enabled()
          torch.set_autocast_enabled(self._enabled)
          torch.autocast_increment_nesting()
  
file_path: lightwood/lightwood/helpers/torch.py
imports: import functools
  import torch
  from torch.nn.functional import pad
  from lightwood.helpers.device import get_devices
label_desc: Use image node_id 2 for calling the LightwoodAutocast obj's underlying member method code with example usage: obj.__enter__() without return types