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 implements Relaxed Operator Fusion in InkFuse. We extend all
existing tests to now also test our ROF backend.
Incremental Fusion conceptually supports relaxed operator fusion. The tuple
buffers that we can install between arbitrary suboperators are similar
to ROF staging points.
This makes it relatively easy to implement ROF in InkFuse.
The main modifications are all found in the
PipelineExecutor
.At a high-level, ROF in InkFuse goes through the following steps:
Suboperator
can attach aROFStrategy
in itsOptimizationProperties
. This indicates whether the suboperatorprefers compilation or vectorization.
ROFScopeGuard
inPipeline.h
. When we decay an operator intosuboperators, this
ROFScopeGuard
can simply be set up duringsuboperator creation and indicates that the generated suboperators
should all be vectorized.
PipelineExecutor
now splits the topological order of thesuboperators into maximum connected components that have
vectorized or JIT preference. The JIT components are then compiled
ahead of time.
sort. Any interpreted comment uses the pre-compiled primitives. Any
compiled component uses the JIT code.
We also fix some bugs that were uncovered along the way. The ROF pipelines stress
our code generation logic in interesting ways that we did not anticipate.
A good example is the second PR in the commit chain that fixed some issues with
how we generate code for filters.