code: def check_rocm():
      import torch
      from torch.torch_version import TorchVersion
  
      if not torch.cuda.is_available() or torch.version.hip is None:
          return None
  
      # Extracts main ROCm version from full string
      torch_rocm_ver = TorchVersion(
          ".".join(list(torch.version.hip.split(".")[0:2]))
      )
  
      # check if torch rocm version matches system rocm version
      rocm_ver = get_rocm_version()
      if rocm_ver != torch_rocm_ver:
          warnings.warn(
              f"ROCm version mismatch, `torch` version: {torch_rocm_ver}, env version: {rocm_ver}"
          )
      if torch_rocm_ver < MIN_ROCM_VERSION:
          warnings.warn(
              f"(`torch`) ROCm version not supported: {torch_rocm_ver} "
              f"- minimum requirement: {MIN_ROCM_VERSION}"
          )
      if rocm_ver < MIN_ROCM_VERSION:
          warnings.warn(
              f"(env) ROCm version not supported: {rocm_ver} "
              f"- minimum requirement: {MIN_ROCM_VERSION}"
          )
  
      return rocm_ver if torch.version.hip else "None"
  
file_path: pytorch/tools/dynamo/verify_dynamo.py
imports: import os
  import re
  import subprocess
  import sys
  import traceback
  import warnings
label_desc: Use image node_id 6 for calling a global function with example usage: check_rocm() and returns: unknown, None