[SYSTEMDS-3891] OOC Pipelining Support, New Primitives, and New Operators #2409
+3,857
−786
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.
This PR introduces pipelining support for operators that produce at most one
MatrixBlockper incoming block. As current out-of-core primitives are highly concurrent, which may lead to fan-outs (and consequential OOMs) for fast-producing source streams, this implementation aims to process downstream operations in the same thread. To reliably clean up referenced objects from caller methods (stack), we defer the downstream task using a thread-local context (if available). Because the deferred call is still executed in the same task of the caller, sequences of pipelining operators are completed before new tasks are taken from the task queue.Additionally, this PR adds new primitives required for general matrix multiplies and adds new operators relying on these new primitives.
We also added (optional) messaging capabilities operators and streams, which may be required to communicate stream capabilities in future (e.g., targeted requests of tiles, cached, ...). While it is still uncertain to what degree these messages can be used, they are required for future experiments.
As streams sometimes need size information, they may now hold the corresponding
CacheableDataobject. Here I don't know if these references can create issues regarding memory management.Finally, this PR contains various bugfixes, safety checks, improved error handling and additional cache features.
Sorry (again) for the large PR.