INNER CODE UNIT · Python

size

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

    def size(self):
        """A function that returns the number of BytePS processes.
        Returns:
          An integer scalar containing the number of BytePS processes.
        """
        size = self.C_LIB_CTYPES.byteps_size()
        if size == -1:
            raise ValueError(
                'BytePS has not been initialized; use bps.init().')
        return size

    def local_size(self):
        """A function that returns the number of BytePS processes within the
        node the current process is running on.
        Returns:
          An integer scalar containing the number of local BytePS processes.
        """
        local_size = self.C_LIB_CTYPES.byteps_local_size()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…