Allow ReadyQueue to handle empty tasks#15791
Conversation
|
Any chance we can get a test for this? :) |
|
@ezyang I added a test. Unfortunately the bug relies on two threads finishing their work in a given order and it's not possible to trick them into syncing the right way (as many ops need to run on both in various orders). But I give much more work to one thread than the other and so the test is really reliable with the current autograd engine. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Allow the comparison function used in ReadyQueue to handle the empty FunctionTasks created by the reentrant autograd. Fix pytorch#11732 Pull Request resolved: pytorch#15791 Differential Revision: D13598006 Pulled By: soumith fbshipit-source-id: 0bfdf28a735fbfe44f0fdbaf8b74a6198e6a1984
Allow the comparison function used in ReadyQueue to handle the empty FunctionTasks created by the reentrant autograd.
Fix #11732