Skip to content

Conversation

@awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Feb 19, 2021

What does this PR do?

Fixes #6077

We had an incorrect yield logic for the context manager.
Modifications to the tests don't pass on master, validating the fix.

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 🙃

@awaelchli awaelchli added bug Something isn't working priority: 0 High priority task labels Feb 19, 2021
@awaelchli awaelchli added this to the 1.2.x milestone Feb 19, 2021
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #6080 (c40a462) into master (0b27147) will decrease coverage by 2%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #6080    +/-   ##
=======================================
- Coverage      93%     91%    -2%     
=======================================
  Files         160     160            
  Lines       11402   11403     +1     
=======================================
- Hits        10654   10380   -274     
- Misses        748    1023   +275     

@awaelchli awaelchli changed the title precision fixes Fix amp autocast Feb 19, 2021
@awaelchli awaelchli marked this pull request as ready for review February 19, 2021 15:52
@awaelchli awaelchli mentioned this pull request Feb 19, 2021
@SeanNaren SeanNaren merged commit 4b7c0fa into master Feb 19, 2021
@SeanNaren SeanNaren deleted the bugfix/precision-cast branch February 19, 2021 17:00
carmocca pushed a commit that referenced this pull request Feb 23, 2021
* precision fixes

* add amp test model

* fix test

* revert

* move assert to training step

* fix test

* fix test

* remove unrelated changes

* add changelog

* remove unused import
lexierule pushed a commit that referenced this pull request Feb 24, 2021
* precision fixes

* add amp test model

* fix test

* revert

* move assert to training step

* fix test

* fix test

* remove unrelated changes

* add changelog

* remove unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: 0 High priority task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mixed precision not working with v 1.2

4 participants