Skip to content

Increase default bulk size to a value greater than one - #24276

Open
vepadulano wants to merge 12 commits into
root-project:masterfrom
vepadulano:df-bulk-wip-bulk-size-greater-than-one
Open

vepadulano wants to merge 12 commits into
root-project:masterfrom
vepadulano:df-bulk-wip-bulk-size-greater-than-one

Conversation

@vepadulano

Copy link
Copy Markdown
Member

Needs #22313 #22461 #22472 #22479 #22494 #23888 #23889 #23890 #23891 #23949

Actually increase default bulk size to a value greater than one. Adjust all data sources and all computation graph node to work with the default value, or in some very rare occasions to complain clearly when a bulk size greater than one is not supported.

Par 10 of N of the dataframe bulk processing effort.

Tested locally on a MacOS ARM64 and a Linux x86-64, skipping CI for now as these changes will not land in 6.42.

@vepadulano vepadulano self-assigned this Nov 20, 2026
@vepadulano vepadulano added the skip ci Skip the full builds on the actions runners label Nov 20, 2026
vepadulano and others added 12 commits November 20, 2026 16:56
Sets the stage for future bulk reading where the actual values that need to be passed to downstream nodes may need to get stored in a separate location.
Nodes of the computation graph which may operate a selection on which entries are valid or not are modified to accommodate for multiple entries being evaluated at the same time. For now, the size of the bulk is set to one.

Note that this commit does not touch in any way the reading of data.
The RLoopManager decides the current bulk size that all nodes of the computation graph must adhere to. Currently this is set to one, in the future it may vary.
define and variation nodes update their current available values via an Update method, this is now prepared to work in bulks, currently assuming always size one.
Enables reading TTree data via TTreeReaderValue into a pre-allocated memory region that will eventually contain the bulk of entries, assuming for now a bulk size of one. The changes are backwards compatible, all tests work with the new bulk loading logic, with one exception and a minor remark.

The remark is that the test_ctors is modified since now the construction and destruction of class instances happens at the boundary of a bulk. Before, TTree could optimize by IO-constructing the value once and then re-assign it across entries.

The exception is the test called PolymorphicTBranchObject in dataframe_regressions.cxx, which reads a TTree branch of on-disk type TObject where at each entry the concrete type of the value is different (namely a TList in the first entry and a TH1D in the second entry). In particular, this is a TBranchObject with split level zero. The approach taken is to disable the bulk loading from RDataFrame in this case and only allow reading one entry at a time for this type of branch.

Co-authored-by: Philippe Canal <pcanal@fnal.gov>
A cache of values of the bulk is created at construction time of RTreeUntypedArrayColumnReader, since TTree requires stable addresses in memory to read branch values from. At loading time, the values are read into the corresponding location of the cache for the current bulk entry index. Currently, this assumes always a bulk size of one.
Create a cache of entry values at construction time of RTreeOpaqueColumnReader, with the size of the bulk currently assumed to be one. Values are read as 'void *' and cached, no further special loading logic required.
Adapts RMaskedColumnReader to work with a bulk of entries, currently assumed to be of size one.
@vepadulano
vepadulano force-pushed the df-bulk-wip-bulk-size-greater-than-one branch from 23ee578 to c35baa3 Compare November 20, 2026 16:26
@github-actions

Copy link
Copy Markdown

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit c35baa3.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:RDataFrame skip ci Skip the full builds on the actions runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant