-
Notifications
You must be signed in to change notification settings - Fork 258
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
Move from torch.cuda.amp to torch.autocast; Add tests for amp #838
base: main
Are you sure you want to change the base?
Conversation
…IR-Chem/fairchem into move_to_autocast_general_and_amp_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @misko, mostly style suggestions
…en-Catalyst-Project/ocp into move_to_autocast_general_and_amp_test
…en-Catalyst-Project/ocp into move_to_autocast_general_and_amp_test
…en-Catalyst-Project/ocp into move_to_autocast_general_and_amp_test
…IR-Chem/fairchem into move_to_autocast_general_and_amp_test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg, just minor suggestions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @misko !
This PR updates torch.cuda.amp.autocast(args...) and torch.cuda.amp.GradScaler(args...) (deprecated) and also adds CPU AMP tests. ( https://pytorch.org/docs/stable/amp.html )
Recently there was an eSCN model that did not run on GPU AMP and the current set of tests did not catch it. This PR adds those equivalent tests on CPU AMP, which will test this going forward.
Additional fixes haven been made to eSCN / SCN / Gemnet OC in this PR.