You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RDataFrame execution order for branches of the computation graph is bottom-up: actions request values to the upstream readers traversing them one by one in reverse order w.r.t. their insertion.
This logic seems to be flipped when the action is JITted. In a simple example with two Defined columns and one Graph, the order of execution of the Defines changes depending on whether the action needs to infer the column types or not.
Correc order (bottom-up)
./repro_graph_compiled.out
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:852 in void ROOT::Detail::RDF::RLoopManager::Run(bool)>: Starting event loop number 0.
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:811 in void ROOT::Detail::RDF::RLoopManager::Jit()>: Nothing to jit and execute.
Defining 'b2': address: 0x7ffe1477198c, value: 42
Defining 'b1': address: 0x7ffe1477198c, value: 10
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:889 in void ROOT::Detail::RDF::RLoopManager::Run(bool)>: Finished event loop number 0 (0s CPU, 6.10352e-05s elapsed).
graph: X: 10,Y:42
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:811 in void ROOT::Detail::RDF::RLoopManager::Jit()>: Nothing to jit and execute.
Wrong order
./repro_graph_jitted.out
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:852 in void ROOT::Detail::RDF::RLoopManager::Run(bool)>: Starting event loop number 0.
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:825 in void ROOT::Detail::RDF::RLoopManager::Jit()>: Just-in-time compilation phase completed in 1.388524 seconds.
Defining 'b1': address: 0x7ffd017cb8dc, value: 42
Defining 'b2': address: 0x7ffd017cb8dc, value: 42
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:889 in void ROOT::Detail::RDF::RLoopManager::Run(bool)>: Finished event loop number 0 (0s CPU, 0.000119925s elapsed).
graph: X: 42,Y:42
Info in <[ROOT.RDF] Info /home/vpadulan/Programs/rootproject/rootsrc/tree/dataframe/src/RLoopManager.cxx:811 in void ROOT::Detail::RDF::RLoopManager::Jit()>: Nothing to jit and execute.
The linked PR fixes the situation. The execution order of the functions passed to Define (within the same branch of the computation graph) was never really specified (neither in the RDataFrame docs, nor in the actual implementation).
Check duplicate issues.
Description
The RDataFrame execution order for branches of the computation graph is bottom-up: actions request values to the upstream readers traversing them one by one in reverse order w.r.t. their insertion.
This logic seems to be flipped when the action is JITted. In a simple example with two
Define
d columns and oneGraph
, the order of execution of theDefine
s changes depending on whether the action needs to infer the column types or not.Correc order (bottom-up)
Wrong order
Reproducer
compiled version
JITted version
ROOT version
Any
Installation method
Built from source
Operating system
Fedora 39
Additional context
No response
The text was updated successfully, but these errors were encountered: