-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow sharing of tensors whose size is unknown to some parties (#184)
Summary: Pull Request resolved: #184 When a party wants to secret-share a tensor, the CrypTen API currently assumes that the other parties know what the size of that tensor will be. This may be problematic, for example, if a party wants to share a data tensor whose size is unknown a priori. To make matters worse, if a party makes an incorrect assumption about the size of the tensor they will receive, the PRZS initialization does not work correctly and the parties may end up with secret shares of a tensor that do not match in size (which, somewhat surprisingly, does not always appear to be caught by Gloo during computations). The diff adds an `broadcast_size` option in the construction of secret-shared tensors. If set to `True`, the `src` party will broadcast the size of the tensor to all other parties so that they can execute the PRZS initialization correctly. We could also add an additional check on the size of the secret shares for all initializations, but I did not do that because it would add a communication round (somewhat defeating the purpose of doing PRZS initialization). This means that the failure case described above still exists; I added documentation describing it. Reviewed By: knottb Differential Revision: D24381193 fbshipit-source-id: 0b2ae19df973dc777f546944adc1e7676d3ef621
- Loading branch information
1 parent
1cd3894
commit 0169987
Showing
7 changed files
with
164 additions
and
27 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
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
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
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