-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Fix nondeterministic tests for GPU runs #314
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
Conversation
The documentation is not available anymore as the PR was closed or merged. |
@anton-l what do you think about instead of skipping those tests when a GPU is available as is now simply forcing the device to be on CPU? This should be a bit safer no? Also I think we can be sure all GPUs have a CPU |
@patrickvonplaten if removing autocast is ok with you, then yes, that was my first thought too :D |
Sure (sorry I copy-pasted that yesterday) |
Thanks for making the change! |
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 for fixing!
Just wading into this after the fact as I've hit similar issues in the past and this is affecting me too... Unfortunately the The following code allows you to get deterministic tests by enforcing random number generation to actually happen on the CPU, while still allowing model evaluation to happen on the GPU:
Replacing all uses of |
Thanks - that looks very interesting! @anton-l - let's try it out no? |
* Fix nondeterministic tests for GPU runs * force SD fast tests to the CPU
This ensures that:
Generator