INNER CODE UNIT · Python

rank

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

    def rank(self):
        """A function that returns the BytePS rank of the calling process.
        Returns:
          An integer scalar with the BytePS rank of the calling process.
        """
        rank = self.C_LIB_CTYPES.byteps_rank()
        if rank == -1:
            raise ValueError(
                'BytePS has not been initialized; use bps.init().')
        return rank

    def local_rank(self):
        """A function that returns the local BytePS rank of the calling process, within the
        node that it is running on. For example, if there are seven processes running
        on a node, their local ranks will be zero through six, inclusive.
        Returns:
          An integer scalar with the local BytePS rank of the calling process.
        """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…