code: def get_target_compute_version(target=None):
      """Utility function to get compute capability of compilation target.
  
      Looks for the target arch in three different places, first in the target input, then the
      Target.current() scope, and finally the GPU device (if it exists).
  
      Parameters
      ----------
      target : tvm.target.Target, optional
          The compilation target
  
      Returns
      -------
      compute_version : str
          compute capability of a GPU (e.g. "8.6")
      """
      # 1. input target object
      # 2. Target.current()
      target = target or Target.current()
      if target and target.arch:
          major, minor = target.arch.split("_")[1]
          return major + "." + minor
  
      # 3. GPU compute version
      if tvm.cuda(0).exist:
          return tvm.cuda(0).compute_version
  
      raise ValueError(
          "No CUDA architecture was specified or GPU detected."
          "Try specifying it by adding '-arch=sm_xx' to your target."
      )
  
imports: from __future__ import absolute_import
  import os
  import subprocess
  import warnings
  import tvm._ffi
  from tvm.target import Target
  from .._ffi.base import py_str
  from .None import utils
label_desc: Use image node_id 7 for calling a global function with example usage: get_target_compute_version(target) and returns: unknown, tvm