Repository navigation
Register parent-reduce rules with the session kernels - #11092
Merged
Merged
Conversation
This was referenced Nov 2, 2026
robert3005
force-pushed
the
rk/session-parent-rules
branch
2 times, most recently
from
November 2, 2026 12:28
1364ff7 to
99ee78b
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
2 times, most recently
from
November 2, 2026 15:11
be6bdae to
951db46
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
2 times, most recently
from
November 2, 2026 19:18
f6a5894 to
a564054
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 3, 2026 13:16
a564054 to
cc7b45d
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 14:31
cc7b45d to
1d85ea1
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 15:29
1d85ea1 to
d493f1f
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 18:30
d493f1f to
aa27450
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 18:42
aa27450 to
0adc708
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 19:36
0adc708 to
3894fcb
Compare
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 4, 2026 20:06
3894fcb to
5402a3c
Compare
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
reviewed
Nov 6, 2026
myrrc
approved these changes
Nov 6, 2026
myrrc
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Can we please remove extra comments and make the function take an impl ScalarFnVtable instead of an Id so we'd have typecheck
myrrc
reviewed
Nov 6, 2026
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 8, 2026 23:16
0b47bf4 to
eff0c36
Compare
Each encoding now registers its parent-reduce rules with the session's ArrayKernels through register_reduce_parent_rule, keyed by the parent and child encoding ids, in place of a static PARENT_RULES set on its vtable. Rules for any scalar function are keyed by AnyScalarFn::id. The vtable reduce_parent hook and ParentRuleSet are removed. The optimizer consults only the registry and skips the children of a parent that no rule is registered for. An ExecutionCtx snapshots the parent-reduce kernels when it is created, so optimizing with the context does not read the session again. The shared dictionary values of a chunked array are now pulled up by a chunked reduce rule instead of a dict parent rule. The deprecated session-less optimize now uses only the rules vortex-array registers by default, and it does not mark its result as optimized. Signed-off-by: Robert Kruszewski <[email protected]>
Create one execution context per sample and mark the input arrays as optimized, so the timed loop measures the slice and its reduction rather than the session lookup and the walk over the unmarked input. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Robert Kruszewski <[email protected]>
- register_reduce_parent_rule and register_scalar_fn_reduce_parent_rule take the parent vtable, such as Cast or Filter, instead of its Id. - Remove the doc comments on the register_parent_rules functions. - Keep the parent-reduce and execute-parent kernels each in one ArcSwap of a HashMap with boxed slices. Registration replaces the value with rcu. Signed-off-by: Robert Kruszewski <[email protected]>
Signed-off-by: Robert Kruszewski <[email protected]>
Callers pass each rule as a const { &rule } block, and the registry keeps a &'static dyn reference to it instead of an Arc.
Signed-off-by: Robert Kruszewski <[email protected]>
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 9, 2026 00:03
eff0c36 to
2ad02c8
Compare
robert3005
enabled stacked auto-merge (squash)
November 9, 2026 00:03
The ALP between rule is now registered with the session, not set on the vtable. The benchmark session did not register ALP, so between decoded the ALP array instead of pushing the bounds into the encoded integers. Signed-off-by: Robert Kruszewski <[email protected]>
robert3005
force-pushed
the
rk/session-parent-rules
branch
from
November 9, 2026 00:09
e8a9352 to
53a4f97
Compare
12 of 49 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Parent-reduce rules move from static
PARENT_RULESsets on the vtables into the session kernel registry, so the session controls all rules, as it already does for execute-parent kernels.Changes
initializefunction, throughArrayKernels::register_reduce_parent_rule. The registry keys the rules by the parent and child encoding ids. Rules for any scalar function useAnyScalarFn::id.ExecutionCtxtakes a snapshot of the parent-reduce kernels when it is created, so optimizing with the context does not read the session again.