forked from facebookresearch/PyTorch-BigGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LockServer consider graph structure and cardinalities for affinity
Summary: The LockServer, when assigning a new bucket to a trainer that was already holding one, used to pick the bucket with highest "affinity" to the previous one. This was defined very simply: try to keep the same left-hand side partition, if possible, and, if not, at least the right-hand side one. This missed out on many subtleties and optimization that were possible with some graph structures. For example, it never considered swapping the left- and right-hand sides when the entities on both sides are the same. Or, if the right-hand side entities were the ones with the highest cardinality (and thus the more expensive to swap), it would still prefer to preserve the left-hand side ones. Here I am fixing the above by making the affinity calculation aware of what entities are on which size and how many there are, so that the affinity reflects more closely the I/O cost incurred by swapping buckets. Reviewed By: adamlerer Differential Revision: D17830062 fbshipit-source-id: f5992d242e8189193137e8d869c6b655d696c409
- Loading branch information
1 parent
6b41eca
commit c07ea71
Showing
2 changed files
with
87 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters