parameters: ()
docstring: Check compatibility of TensorRT version.
  
    Raises:
      RuntimeError: if the TensorRT library version is incompatible.
docstring_summary: Check compatibility of TensorRT version.
docstring_tokens: Check compatibility of TensorRT version .
function: def _check_trt_version_compatibility():
    """Check compatibility of TensorRT version.
  
    Raises:
      RuntimeError: if the TensorRT library version is incompatible.
    """
    compiled_version = wrap_py_utils.get_linked_tensorrt_version()
    loaded_version = wrap_py_utils.get_loaded_tensorrt_version()
    tf_logging.info("Linked TensorRT version: %s" % str(compiled_version))
    tf_logging.info("Loaded TensorRT version: %s" % str(loaded_version))
    version_mismatch = False
    if loaded_version[0] < compiled_version[0]:
      tf_logging.error(
          "TensorRT version mismatch. Tensorflow was compiled against " +
          "TensorRT %s but library loaded from environment is TensorRT %s" %
          (".".join([str(x) for x in compiled_version]),
           ".".join([str(x) for x in loaded_version])) +
          ". Please make sure that correct version of TensorRT " +
          "is available in the system and added to ldconfig or LD_LIBRARY_PATH")
      raise RuntimeError("Incompatible TensorRT library version")
    for i in zip(loaded_version, compiled_version):
      if i[0] != i[1]:
        tf_logging.warn("TensorRT mismatch. Compiled against version " +
                        "%s, but loaded %s. Things may not work" %
                        (".".join([str(x) for x in compiled_version]),
                         ".".join([str(x) for x in loaded_version])))
        version_mismatch = True
        break
    if not version_mismatch:
      tf_logging.info("Running against TensorRT version %s" %
                      ".".join([str(x) for x in loaded_version]))
function_tokens: def _check_trt_version_compatibility ( ) : compiled_version = wrap_py_utils . get_linked_tensorrt_version ( ) loaded_version = wrap_py_utils . get_loaded_tensorrt_version ( ) tf_logging . info ( "Linked TensorRT version: %s" % str ( compiled_version ) ) tf_logging . info ( "Loaded TensorRT version: %s" % str ( loaded_version ) ) version_mismatch = False if loaded_version [ 0 ] < compiled_version [ 0 ] : tf_logging . error ( "TensorRT version mismatch. Tensorflow was compiled against " + "TensorRT %s but library loaded from environment is TensorRT %s" % ( "." . join ( [ str ( x ) for x in compiled_version ] ) , "." . join ( [ str ( x ) for x in loaded_version ] ) ) + ". Please make sure that correct version of TensorRT " + "is available in the system and added to ldconfig or LD_LIBRARY_PATH" ) raise RuntimeError ( "Incompatible TensorRT library version" ) for i in zip ( loaded_version , compiled_version ) : if i [ 0 ] != i [ 1 ] : tf_logging . warn ( "TensorRT mismatch. Compiled against version " + "%s, but loaded %s. Things may not work" % ( "." . join ( [ str ( x ) for x in compiled_version ] ) , "." . join ( [ str ( x ) for x in loaded_version ] ) ) ) version_mismatch = True break if not version_mismatch : tf_logging . info ( "Running against TensorRT version %s" % "." . join ( [ str ( x ) for x in loaded_version ] ) )