Repository navigation
[tmva][sofie] Remove some historical code paths and helpers - #23497
Merged
Merged
Conversation
The Session struct is now the only way the inference code is generated. The no-session mode was the original output format kept for backward compatibility: it is untested in-tree, incompatible with dynamic tensors and with a separate weight file, and its only remaining property (static, allocation-free generated code) is orthogonal to scoping and is better reintroduced as an explicit allocation-strategy option when the need arises. Removes the kNoSession Options value, the fUseSession flags on RModel_Base and ROperator, and the parallel no-session emission branches in RModel::GenerateSessionCode/GenerateOutput and in the Conv, ConvTranspose, Pool, Reduce, GRU, LSTM and RNN operators.
RModel_Base was introduced with the SOFIE-GNN support (RModel_GNN, RModel_GraphIndependent) to share the generated-code machinery between the model classes. Since the GNN classes were removed, RModel is its only derived class, and the split is pure indirection. Move all members and functions into RModel and delete the base class. The moved implementations (GenerateHeaderInfo, EmitHelperFunctionsCode and the file-writing part of OutputGenerated) are kept byte-identical to ease review; the constructor logic is folded into the RModel constructor. RModel_Base is dropped from the dictionary, the build and the public header list; its removal from the LinkDef is safe because RModel has no ROOT IO support.
The SofieFunctor/SofieFunctorHelper adapter in SOFIEHelpers.hxx only supports models with a single flat float input tensor and a single scalar output, and silently relies on the RDataFrame column order matching the model input layout. Instead of a helper that generalizes poorly, the RDataFrame tutorials now show the underlying pattern explicitly: one Session object per processing slot, dispatched by slot number, with the input tensor assembled from the columns in the functor body. This makes session ownership (and its weight loading) visible and is straightforward to adapt to multiple inputs or outputs.
guitargeek
requested review from
bellenot,
couet,
dpiparo and
lmoneta
as code owners
September 25, 2026 14:52
Test Results 22 files 22 suites 3d 11h 53m 9s ⏱️ For more details on these failures, see this check. Results for commit a74917a. ♻️ This comment has been updated with latest results. |
dpiparo
approved these changes
Sep 29, 2026
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.
kNoSessioncode generation mode. This reduces the possible configuration space for SOFIE, and there is no reason to not use a session class at this point.graph_netslibrary is removed, there is not reason anymore for this split. See [tmva][sofie] Evolve the SOFIE GNN support from graph_nets to PyTorch + ONNX #23144 for the removal.More detail in the commit messages.