def load_tensor_adapter(backend, version):
    """Tell DGL to load a tensoradapter library for given backend and version.

    Parameters
    ----------
    backend : str
        The backend (currently ``pytorch``, ``mxnet`` or ``tensorflow``).
    version : str
        The version number of the backend.
    """
    global tensor_adapter_loaded
    version = version.split("+")[0]
    if sys.platform.startswith("linux"):
        basename = "libtensoradapter_%s_%s.so" % (backend, version)
    elif sys.platform.startswith("darwin"):
        basename = "libtensoradapter_%s_%s.dylib" % (backend, version)
    elif sys.platform.startswith("win"):
        basename = "tensoradapter_%s_%s.dll" % (backend, version)
    else:
        raise NotImplementedError("Unsupported system: %s" % sys.platform)
    path = os.path.join(_DIR_NAME, "tensoradapter", backend, basename)
    tensor_adapter_loaded = _LIB.DGLLoadTensorAdapter(path.encode("utf-8")) == 0
    if not tensor_adapter_loaded:
        logger = logging.getLogger("dgl-core")
        logger.debug("Memory optimization with PyTorch is not enabled.")
Tell DGL to load a tensoradapter library for given backend and version.

    Parameters
    ----------
    backend : str
        The backend (currently ``pytorch``, ``mxnet`` or ``tensorflow``).
    version : str
        The version number of the backend.
    
python/dgl/_ffi/base.py