Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tuple data communication #139

Merged
merged 16 commits into from
Dec 4, 2017
Merged

Conversation

levelfour
Copy link
Contributor

@levelfour levelfour commented Nov 21, 2017

The current version of chainermn.functions.{send,recv} can communicate with only one array.
This hinders the flexibility of MultiNodeChainList since we can't send multiple arrays at the same time:

class NN0(chainer.Chain):
    def __call__(self, x):
        y0 = some_calculation_nn0_0(x)
        y1 = some_calculation_nn1_1(x)
        return y0, y1

class NN1(chainer.Chain):
    def __call__(self, y):
        y0, y1 = y
        return some_calculation_nn1(y0, y1)

class Model_on_Process_0(chainermn.MultiNodeChainList):
    def __init__(self, comm):
        super(Model_on_Process_0, self).__init__(comm=comm)
        self.add_link(NN0(), rank_in=None, rank_out=1)

class Model_on_Process_1(chainermn.MultiNodeChainList):
    def __init__(self, comm):
        super(Model_on_Process_1, self).__init__(comm=comm)
        self.add_link(NN1(), rank_in=0, rank_out=None)

@levelfour levelfour changed the title [WIP] Support tuple data communication Support tuple data communication Nov 28, 2017
@levelfour levelfour changed the title Support tuple data communication [WIP] Support tuple data communication Nov 28, 2017
@levelfour levelfour changed the title [WIP] Support tuple data communication Support tuple data communication Nov 28, 2017
@keisukefukuda keisukefukuda self-requested a review December 4, 2017 07:12
@keisukefukuda keisukefukuda self-assigned this Dec 4, 2017
@keisukefukuda keisukefukuda merged commit 3681d7b into chainer:master Dec 4, 2017
@iwiwi iwiwi added this to the v1.1.0 milestone Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants