-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYSTEMDS-2994+2991] CLA Workload Analyzer and Workload Representation #1303
Conversation
I could use some feedback on this one, @mboehm7 . |
thanks - I'll make a detailed pass Friday this week. |
I noticed that you are transmitting the whole tree, via an integer ID, to the instruction runtime. I am not well aware of the intention, but can we not follow the conventional path: optimize the tree/DAG in the optimizer, extract information, and transmit via the instructions strings of the corresponding instructions; and/or do the same during recompilation? That way you can stick to the supposed separation of compiler and runtime, and can easily scale to distributed runtimes such as Spark and federated. |
Excellent question. The instruction strings then would have to be able to contain nested structures, since the workload tree provide means of separating different loops into sub tree nodes in the structure. If a string instruction containing this should be constructed it means that the string ends up with different lengths depending on how many sub loops are executed. Providing an id to the structure and storing the tree somewhere else seams more scalable and flexible to future modifications where new types of instructions are added to the WTree. Also note that currently we look up our matrix objects the same way via an id provided to the instruction string, (just with another back-end that we have worked with much much longer). The reason why I'm not using that back-end is because it require specific data types contained, like Data, MatrixValue, MatrixBlock, FrameBlock, etc. |
public static Pair<MatrixBlock, CompressionStatistics> compress(MatrixBlock mb, int k, WTreeRoot root){ | ||
return compress(mb, k, new CompressionSettingsBuilder().create()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are not using root in this method. Is this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, this PR simply wire up the tree to allow the compression instruction to use it, my WIP PR is the actual implementation.
I think the way the WTree is added to the instructions seems reasonable if the CompressionCPInstruction needs the entire tree, but is this really the case? Isn't it possible to add the information about compression contained in the tree and add it to the different instructions, so instead of putting all the information into a single CompressionCPInstruction string (which would have variable length), the information should be placed in the relevant instruction strings so that each of the strings contains only the compression information needed for its instruction execution (resulting in an instruction string of fixed length). |
Yes, but that is assuming that i know at compile time what information is needed in the runtime of an arbitrary matrix.
Since the Compression instruction is one instruction i don't see how i should create multiple instruction strings? Maybe I'm missing the question.
To clarify the loops: Lets say i read in a matrix
This matrix is used in a nested for loop at different locations
for optimizing compression for workflow i need to know
all this can be encapsulated in the "AWTree" object, and is hard to add to the instruction string since this string then would have to support all this complexity. The information cannot just be extracted at compile time because i need access to the actual data that is being compressed to optimize for the given instructions. |
Well, if you cannot extract the information at compile time and cannot build the tree during runtime, then I agree that the best solution is to put the information somewhere that is not in the instruction string, like you have done in this PR. Another comment: If you change the |
should be changed now, But it is not enough to make it applicable to federated, for that you need to define
also if you decide to do so, we need to move this workload package to some more general location. perhaps a new package called workload in the runtime folder? |
It is only the tree-structure I intent to reuse. The only purpose is to use it as a representation of execution plans.
Yes, that would be a good idea. |
LGTM. Overall, I think this map is fine - generating a unique token, storing the WTree globally under this token, and compiling the token into the compression instruction for later access is (in my opinion) the best option here. We could further make the WTree part of the normal explain output - that way it's not much different from our dictionaries of functions that are shown in the explain after compilation and then called from multiple different places. Some minor additional comments:
|
Thanks for the comments, @phaniarnab @mboehm7 @sebwrede Closing PR because of continued work in PR : #1320 , will merge after the Release |
This PR connects the workload tree with the compression instruction,
this is done by constructing a global singleton-Hash-Map that can share objects via integer Ids,
this id is then appended to the compression instruction, and allow the parsing of the Workload tree from Hop level to
be accessed at Lop level.
I would like some comments if this is okay, also i am concerned about spark implementation,
since i would have to parse and send the WTree along with the spark instructions to workers.