code: def check_cuda():
      import torch
      from torch.torch_version import TorchVersion
  
      if not torch.cuda.is_available() or torch.version.hip is not None:
          return None
  
      torch_cuda_ver = TorchVersion(torch.version.cuda)
  
      # check if torch cuda version matches system cuda version
      cuda_ver = get_cuda_version()
      if cuda_ver != torch_cuda_ver:
          # raise VerifyDynamoError(
          warnings.warn(
              f"CUDA version mismatch, `torch` version: {torch_cuda_ver}, env version: {cuda_ver}"
          )
  
      if torch_cuda_ver < MIN_CUDA_VERSION:
          # raise VerifyDynamoError(
          warnings.warn(
              f"(`torch`) CUDA version not supported: {torch_cuda_ver} "
              f"- minimum requirement: {MIN_CUDA_VERSION}"
          )
      if cuda_ver < MIN_CUDA_VERSION:
          # raise VerifyDynamoError(
          warnings.warn(
              f"(env) CUDA version not supported: {cuda_ver} "
              f"- minimum requirement: {MIN_CUDA_VERSION}"
          )
  
      return cuda_ver if torch.version.hip is None 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 5 for calling a global function with example usage: check_cuda() and returns: unknown, None