Skip to content

[SYSTEMDS-2982] Federated instructions w/ multiple aligned matrices#1314

Closed
ywcb00 wants to merge 10 commits intoapache:masterfrom
ywcb00:feat/runtime/instructions/fed/aligned/others
Closed

[SYSTEMDS-2982] Federated instructions w/ multiple aligned matrices#1314
ywcb00 wants to merge 10 commits intoapache:masterfrom
ywcb00:feat/runtime/instructions/fed/aligned/others

Conversation

@ywcb00
Copy link
Copy Markdown
Contributor

@ywcb00 ywcb00 commented Jun 11, 2021

Hi,
This PR adds support for federated binary, aggregate ternary, aggregate binary, ctable, and mmchain instructions with multiple aligned federated matrices.
I introduced a new enum AType and the method isAligned(AType) inside the FederationMap to simplify the alignment checks (to check for multiple possible partial alignments with a single call).
To avoid redundant code, I created a new static method isFederated() in SpoofFEDInstruction, which is only a consolidation of the isFederated() method of SpoofCPInstruction and SpoofSPInstruction.
In addition, I changed several tests in order to include testcases with multiple federated inputs.

Thanks for review :)

Copy link
Copy Markdown
Contributor

@sebwrede sebwrede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only added a few comments.
Otherwise, LGTM.

ywcb00 added 10 commits June 15, 2021 15:20
…o accept partial alignments (row alignment - row partitioned / col alignment - col partitioned)

feat(FederatedLogicalTest): extend test to also test with two aligned federated matrices
…ion for fed_ba+* (quick fix)

feat(FederatedRowAggregateTest): add test script to test the dot product of two aligned federated matrices
…ned federated matrices

feat(FederatedColAggregateTest): add test script to test the ternary aggregation "fed_tack+*" with three aligned federated matrices

fead(FederatedFullAggregateTest): add test script to test the ternary aggregation "fed_tak+*" with three aligned federated matrices
chore(FederatedIfelseTest): change alligned to aligned
…ferent possible alignment checks

	add new method isAligned(AType...) to simplify the check for different possible alignments

feat(SpoofFEDInstruction.java): create static method isFederated() to centralize the isFederated methods of SpoofCPInstruction and SpoofSPInstruction

refactor(SpoofCPInstruction.java): change method isFederated to make a simple call to the static isFederated method of SpoofFEDInstruction

refactor(SpoofSPInstruction.java): change method isFederated to make a simple call to the static isFederated method of SpoofFEDInstruction

chore(AggregateTernaryFEDInstruction.java): change alignment checks to use the new method isAligned(AType...)

chore(BinaryMatrixMatrixFEDInstruction.java): change alignment checks to use the new method isAligned(AType...)
…ion for fed_ba+* (quick fix)

feat(FederatedRowAggregateTest): add test script to test the dot product of two aligned federated matrices
	add description as comment to enum elements of AlignType

feat(SpoofCPInstruction.java): remove method isFederated()
	add getter method getInputs() to get the input CPOperands from the outside

feat(SpoofSPInstruction.java): remove method isFederated()
	add getter method getInputs() to get the input CPOperands from the outside

refactor(FEDInstructionUtils.java): change calls to isFederated from CP or SP spoof instruction to directly call the static method SpoofFEDInstruction.isFederated()

chore(**FEDInstruction.java): change name AType to AlignType
@ywcb00 ywcb00 force-pushed the feat/runtime/instructions/fed/aligned/others branch from 34d1700 to cb6222d Compare June 15, 2021 13:25
@ywcb00
Copy link
Copy Markdown
Contributor Author

ywcb00 commented Jun 15, 2021

Thank you for the feedback @sebwrede :)
I changed the code according to your suggestions.

ilovemesomeramen pushed a commit to ilovemesomeramen/systemds that referenced this pull request Jul 21, 2021
Change alignment check to accept partial alignments
(row alignment - row partitioned / col alignment - col partitioned).
Introduce new enum AlignType to address the different possible alignment.
This enum add a new method isAligned(AlignType...) to simplify the check
for different possible alignments

- fix instruction string creation for fed_ba+*
- add support for three aligned federated matrices
- create static method isFederated() to centralize the isFederated methods
of SpoofCPInstruction and SpoofSPInstruction
- change method isFederated to make a simple call to the static
isFederated method of SpoofFEDInstruction
- change alignment checks to use the new method isAligned(AlignType...)
- add getter method getInputs() to get the input CPOperands from the outside
- change calls to isFederated from CP or SP spoof instruction to directly
call the static method SpoofFEDInstruction.isFederated()

- extend test to also test with two aligned federated matrices
- extend test for partitioned federated data
- add test script to test the dot product of two aligned federated matrices
- add test script to test the ternary aggregation "fed_tack+*"
- add test script to test the ternary aggregation "fed_tak+*"

Closes apache#1314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants