INNER CODE UNIT · Python

full_path

bytedance/byteps · byteps/common/__init__.py:45

    full_path = get_extension_full_path(pkg_path, *args)
    if not os.path.exists(full_path):
        raise ImportError(
            'Extension %s has not been built.  If this is not expected, reinstall '
            'BytePS with %s=1 to debug the build error.' % (ext_name, ext_env_var))


class BytePSBasics(object):
    """Wrapper class for the basic BytePS API."""

    def __init__(self, pkg_path, *args):
        full_path = get_extension_full_path(pkg_path, *args)
        self.C_LIB_CTYPES = ctypes.CDLL(full_path, mode=ctypes.RTLD_GLOBAL)

    def init(self, lazy=True):
        """A function that inits BytePS."""
        atexit.register(self.shutdown)
        if lazy:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…