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: * `__call__(self, func)`: Returns a decorated function that enables AMP when it is called.
docstr_tok: ["*","`","__call__","(","self",",","func",")","`",":","Returns","a","decorated","function","that","enables","AMP","when","it","is","called","."]
code: def __call__(self, func):
      """
      * `__call__(self, func)`: Returns a decorated function that enables AMP when it is called.
      """
  
      @functools.wraps(func)
      def decorate_autocast(*args, **kwargs):
          with self:
              return func(*args, **kwargs)
  
      return decorate_autocast
  
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 4 for calling the LightwoodAutocast obj's underlying member method code with example usage: obj.__call__(func) and returns: decorate_autocast, func