awslabs / sockeye

Sequence-to-sequence framework with a focus on Neural Machine Translation based on PyTorch
https://awslabs.github.io/sockeye/
Apache License 2.0
1.21k stars 323 forks source link

Add --tf32 device flag for transparent float32 acceleration #1066

Closed graehl closed 2 years ago

graehl commented 2 years ago

Pull Request Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

fhieber commented 2 years ago

Thanks Johnathan! I agree that defaulting to allow_tf32 to keep behavior consistent to previous versions would be preferred. While you are at it, you could also update requirements.txt to allow PyTorch 1.12.x (<1.13.0)

graehl commented 2 years ago

I was unaware that it defaulted true previously. Agree.

graehl commented 2 years ago

I rebased into a single commit for all of the above.

graehl commented 2 years ago

had to revert pytest<3 requirement (but in fact tests fail w/ pytest 3) due to automated test failure above (tests work locally for me)

fhieber commented 2 years ago

Thanks for the changes, I realized I never submitted my pending review from over a month ago, apologies for the delay. I'll merge this now.