Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[doc] add example multiprocess code#16345

Closed
ailzhang wants to merge 3 commits into
pytorch:masterfrom
ailzhang:update_multiprocessing_doc
Closed

[doc] add example multiprocess code#16345
ailzhang wants to merge 3 commits into
pytorch:masterfrom
ailzhang:update_multiprocessing_doc

Conversation

@ailzhang
Copy link
Copy Markdown
Contributor

Comment thread docs/source/multiprocessing.rst Outdated

p.join()

`q` and `e` are used to coordinate between sender and receiver processes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be clearer here if we briefly explained why we need the e before diving into the mechanics. We could also make this even more explicit in the code by deleting s_sample when the wait comes back.

The other subtlety, which I recall you telling me about, is that you have to actually delete the tensor, it's not enough to not use it anymore. That's also worth explicitly calling out here.

@ailzhang
Copy link
Copy Markdown
Contributor Author

@ezyang another review on this? :D

Copy link
Copy Markdown
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

OK, this'll do

@ailzhang
Copy link
Copy Markdown
Contributor Author

Thanks @ezyang !

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Jan 30, 2019
Summary: fixes #16141

Differential Revision: D13868539

Pulled By: ailzhang

fbshipit-source-id: 03e858d0aff7804c5e9e03a8666f42fd12836ef2
@ailzhang
Copy link
Copy Markdown
Contributor Author

ailzhang commented Feb 5, 2019

This is already landed on master. Closing.

@ailzhang ailzhang closed this Feb 5, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary: fixes pytorch#16141

Differential Revision: D13868539

Pulled By: ailzhang

fbshipit-source-id: 03e858d0aff7804c5e9e03a8666f42fd12836ef2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[multiprocessing] does not play well with distributions in GPU

3 participants