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

MultiNodeIterator #186

Merged
merged 27 commits into from Mar 8, 2018
Merged

MultiNodeIterator #186

merged 27 commits into from Mar 8, 2018

Conversation

levelfour
Copy link
Contributor

@levelfour levelfour commented Jan 16, 2018

This PR adds MultiNodeIterator, where master process broadcasts shuffled batches to slave processes.
In addition to MultiNodeIterator, this PR also adds the following features, needed for implementing it:

  • bcast and gather for ChainerMN communicator
  • chainermn.functions.bcast -> not needed anymore

@levelfour levelfour changed the title [WIP] MultiNodeIterator MultiNodeIterator Feb 1, 2018
@iwiwi iwiwi requested a review from shu65 February 16, 2018 04:20
Copy link
Member

@shu65 shu65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


msgtype = self.mpi_comm.bcast(msgtype, root)
shape = msgtype.shapes[0]
buf = _memory_utility.array_to_buffer_object(x)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the data type of x assumes float32, I think that it is better to add an assertion to check x.dtype.

'gather cannot handle different shapes of data')

# Gather data.
sbuf = _memory_utility.array_to_buffer_object(x)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

if is_master:
msgtype = _MessageType(x)
if msgtype.is_tuple:
raise ValueError('cannot broadcast tuple data')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about TypeError?

@shu65 shu65 merged commit 446ac48 into chainer:master Mar 8, 2018
@kuenishi kuenishi added this to the v1.3.0 milestone Apr 5, 2018
@shu65 shu65 added the feature label May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants