phaniarnab commented on code in PR #1574:
URL: https://github.com/apache/systemds/pull/1574#discussion_r841569873
##########
src/main/java/org/apache/sysds/runtime/controlprogram/federated/FederationMap.java:
##########
@@ -226,11 +228,27 @@ public FederatedRequest broadcast(ScalarObject scalar) {
// multi-threaded block slicing and federation request creation
FederatedRequest[] ret = new FederatedRequest[ix.length];
Arrays.setAll(ret,
- i -> new FederatedRequest(RequestType.PUT_VAR,
lineageTrace, id,
- cb.slice(ix[i][0], ix[i][1], ix[i][2],
ix[i][3], isFrame ? new FrameBlock() : new MatrixBlock())));
+ i -> sliceBroadcastBlock(ix[i], id, cb, lineageItem,
isFrame));
return ret;
}
+ private FederatedRequest sliceBroadcastBlock(int[] ix, long id,
CacheBlock cb, LineageItem objLi, boolean isFrame) {
+ LineageItem li = null;
+ if(objLi != null) {
+ final String scalarCPOSuffix =
InstructionUtils.concatOperands(
+ DataType.SCALAR.name(), ValueType.INT64.name(),
String.valueOf(true));
+ // manually create a lineage item for indexing to
complete the lineage trace for slicing
+ li = new LineageItem(RightIndex.OPCODE, new
LineageItem[]{objLi,
+ new
LineageItem(InstructionUtils.concatOperandParts(String.valueOf(ix[0] + 1),
scalarCPOSuffix)),
+ new
LineageItem(InstructionUtils.concatOperandParts(String.valueOf(ix[1] + 1),
scalarCPOSuffix)),
+ new
LineageItem(InstructionUtils.concatOperandParts(String.valueOf(ix[2] + 1),
scalarCPOSuffix)),
+ new
LineageItem(InstructionUtils.concatOperandParts(String.valueOf(ix[3] + 1),
scalarCPOSuffix))});
Review Comment:
Thanks, @ywcb00. You are right about getLineage().
The current change looks fine to me. I will merge the PR later today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]