Skip to content

Conversation

@rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Feb 20, 2021

What does this PR do?

There is no need to transfer the batch to the device in DP mode since it's handled internally. Else what's happening now is let say a batch with batch_size 32 is there. Then first it's transferred to gpu:0, passed to the model wrapped around DataParallel and again transferred to separate devices after splitting. So the first transfer is unnecessary.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #6098 (c9449c0) into master (079fe9b) will decrease coverage by 0%.
The diff coverage is 95%.

@@          Coverage Diff           @@
##           master   #6098   +/-   ##
======================================
- Coverage      94%     94%   -0%     
======================================
  Files         161     161           
  Lines       11516   11485   -31     
======================================
- Hits        10775   10741   -34     
- Misses        741     744    +3     

@rohitgr7 rohitgr7 added the bug Something isn't working label Feb 20, 2021
@rohitgr7 rohitgr7 added this to the 1.2.x milestone Feb 20, 2021
@rohitgr7 rohitgr7 force-pushed the bugfix/dp_batch_transfer branch from 4c8a09d to 3ad5e86 Compare February 20, 2021 17:40
@rohitgr7 rohitgr7 marked this pull request as ready for review February 20, 2021 18:12
@mergify mergify bot removed the has conflicts label Feb 22, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

Overall, looks good !

@Borda Borda added the ready PRs ready to be merged label Feb 22, 2021
@Borda Borda enabled auto-merge (squash) February 22, 2021 14:08
@Borda Borda added the _Will label Feb 22, 2021
@rohitgr7 rohitgr7 changed the title Disable batch transfer in DP mode [WIP] Disable batch transfer in DP mode Feb 22, 2021
@rohitgr7 rohitgr7 changed the title [WIP] Disable batch transfer in DP mode Disable batch transfer in DP mode Feb 22, 2021
@Borda Borda force-pushed the bugfix/dp_batch_transfer branch from 95b9e87 to 8c7c85a Compare March 4, 2021 19:34
@mergify mergify bot added the has conflicts label Mar 4, 2021
@pep8speaks
Copy link

pep8speaks commented Mar 5, 2021

Hello @rohitgr7! Thanks for updating this PR.

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-03-11 15:22:41 UTC

@mergify mergify bot removed the has conflicts label Mar 6, 2021
@mergify mergify bot added the has conflicts label Mar 8, 2021
@mergify mergify bot removed the has conflicts label Mar 11, 2021
@carmocca carmocca disabled auto-merge March 11, 2021 15:29
@carmocca carmocca enabled auto-merge (squash) March 11, 2021 15:29
@lexierule lexierule disabled auto-merge March 11, 2021 15:51
@lexierule lexierule merged commit c53edce into master Mar 11, 2021
@lexierule lexierule deleted the bugfix/dp_batch_transfer branch March 11, 2021 15:51
@carmocca carmocca mentioned this pull request Mar 15, 2021
SeanNaren pushed a commit that referenced this pull request Mar 16, 2021
* add exceptions and test

* hook

* fix

* clean up

* clean up

* regex

* regex

* docs

* rev

* comment and docs

* chlog

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <[email protected]>

* Apply suggestions from code review

Co-authored-by: chaton <[email protected]>

* Monkey-patch device count

* docs

* pep

* api_change

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: chaton <[email protected]>

(cherry picked from commit c53edce)
lexierule pushed a commit that referenced this pull request Mar 16, 2021
* add exceptions and test

* hook

* fix

* clean up

* clean up

* regex

* regex

* docs

* rev

* comment and docs

* chlog

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <[email protected]>

* Apply suggestions from code review

Co-authored-by: chaton <[email protected]>

* Monkey-patch device count

* docs

* pep

* api_change

Co-authored-by: Carlos Mocholí <[email protected]>
Co-authored-by: chaton <[email protected]>

(cherry picked from commit c53edce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready PRs ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants