code: def is_rocm_pytorch() -> bool:
      is_rocm = False
      if TORCH_VERSION != "parrots":
          try:
              from torch.utils.cpp_extension import ROCM_HOME
  
              is_rocm = (
                  True
                  if (
                      (torch.version.hip is not None)
                      and (ROCM_HOME is not None)
                  )
                  else False
              )
          except ImportError:
              pass
      return is_rocm
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/utils/parrots_wrapper.py
imports: from functools import partial
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: is_rocm_pytorch() and returns: is_rocm