-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[FEAT] EVA: ensure deterministic behavior of SVD on multi gpu setups #2225
Conversation
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 these small fixes for distributed EVA. Overall, this looks good as is but I have added some comments for potential improvement, please check.
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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 the updates. I have some nits, WDYT?
@BenjaminBossan thanks for the suggestions, I integrated them! |
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 these updates to EVA, LGTM.
Deterministic behavior of SVD computations on layer inputs is important on multi gpu setups to ensure resulting EVA state dicts are identical. Currently deterministic behaviour of SVD is ensured by just setting torch.manual_seed() inside
_get_eva_state_dict
which is not ideal because it can interfere with the seed set by the user. I therefore moved this functionality inside theIncrementalPCA
class.I also added a new argument for
get_eva_state_dict
:gather_distributed_inputs
which isFalse
by default and defines if inputs should be concatenated for the SVD computation for distributed runs.