feat: improve context and tensor implemention#4133
Open
sagewe wants to merge 11 commits intofeature/heterogeneous-acceleration-architecturefrom
Open
feat: improve context and tensor implemention#4133sagewe wants to merge 11 commits intofeature/heterogeneous-acceleration-architecturefrom
sagewe wants to merge 11 commits intofeature/heterogeneous-acceleration-architecturefrom
Conversation
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
|
|
||
| try: | ||
| import gmpy2 | ||
| except: |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| except: | |
| except BaseException: |
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
python/fate_arch/tensor/_tensor.py
Outdated
| f"keygen for kind<{kind}>-distributed<{self.distributed}>-device<{self.device}> is not implemented" | ||
| ) | ||
|
|
||
| def random_tensor(self, shape, num_partition = 1) -> "FPTensor": |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| def random_tensor(self, shape, num_partition = 1) -> "FPTensor": | |
| def random_tensor(self, shape, num_partition=1) -> "FPTensor": |
| # 2. remote table | ||
| ctx._push(parties, deserializer.table_key, self._tensor) | ||
|
|
||
| class PHETensor: |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class PHETensor: | |
| class PHETensor: |
| tensor = ctx._pull([party], self.table_key)[0] | ||
| return PHETensor(ctx, tensor) | ||
|
|
||
| class FPTensorFederationDeserializer(FederationDeserializer): |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class FPTensorFederationDeserializer(FederationDeserializer): | |
| class FPTensorFederationDeserializer(FederationDeserializer): |
| # 2. remote table | ||
| ctx._push(parties, deserializer.table_key, self._blocks_table) | ||
|
|
||
| class PHETensorDistributed(PHETensorABC): |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class PHETensorDistributed(PHETensorABC): | |
| class PHETensorDistributed(PHETensorABC): |
| # 2. remote table | ||
| ctx._push(parties, deserializer.table_key, self._blocks_table) | ||
|
|
||
| class PaillierPHEEncryptorDistributed(PHEEncryptorABC): |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class PaillierPHEEncryptorDistributed(PHEEncryptorABC): | |
| class PaillierPHEEncryptorDistributed(PHEEncryptorABC): |
| PaillierPHEDecryptorDistributed(block_decryptor), | ||
| ) | ||
|
|
||
| class PHETensorFederationDeserializer(FederationDeserializer): |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class PHETensorFederationDeserializer(FederationDeserializer): | |
| class PHETensorFederationDeserializer(FederationDeserializer): |
| tensor._is_transpose = self.is_transpose | ||
| return tensor | ||
|
|
||
| class FPTensorFederationDeserializer(FederationDeserializer): |
Contributor
There was a problem hiding this comment.
[autopep8] reported by reviewdog 🐶
Suggested change
| class FPTensorFederationDeserializer(FederationDeserializer): | |
| class FPTensorFederationDeserializer(FederationDeserializer): |
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
Signed-off-by: weiwee <wbwmat@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.