[tmva][sofie] Several Fixes for parsing complex models #22150
[tmva][sofie] Several Fixes for parsing complex models #22150lmoneta wants to merge 2 commits intoroot-project:masterfrom
Conversation
lmoneta
commented
May 5, 2026
- After the changes for CLAD the mlpf modek could not be parsed anymore. Handle now correctly the variable defining the number of non zero elements coming from Non_Zero
- Fixes also TMVA::SOFIE::Copy for different types than float making it a template function
- Add also output shape definition in generated code as it is done for the input
- After the changes for CLAD the mlpf modek could not be parsed anymore. Handle now correctly the variable defining the number of non zero elements coming from Non_Zero - Fixes also TMVA::SOFIE::Copy for different types than float making it a template function - Add also output shape definition in generated code as it is done for the input
guitargeek
left a comment
There was a problem hiding this comment.
Thanks you very much! Looks good to me once the test is fixed.
guitargeek
left a comment
There was a problem hiding this comment.
Actually I remember that the RModel has a non-zero class version, and we can't add new non-transient data members without incrementing the class version.
Does the RModel actually need to be serializable?
Same discussion as here:
| MemoryPoolInfo fIntermediateMemoryInfo; ///<! intermediate memory info (transient) | ||
| std::unordered_map<std::string_view, size_t> fIntermediateTensorFrequencyLookup; ///<! lookup table for intermediate tensor frequency (transient) | ||
|
|
||
| std::string fExtraCodeForDimShapes; // extra code needed for initialization of dynamic parameters (e.g. number of non zero elements in NonZero operator) |
There was a problem hiding this comment.
We can't add new non-transient class members without updating the class version
There was a problem hiding this comment.
Now version 0 is used to flag that RModel is not made persistent
Test Results 22 files 22 suites 3d 7h 57m 9s ⏱️ For more details on these failures, see this check. Results for commit 0ff68ea. ♻️ This comment has been updated with latest results. |
The casting to bool was incorrect since it was done a cast to uint8. Fix also the special case of NonZero dynamic parameter which is defindef by NonZero operator. Add at the end a Session data member for the parameter which is then used in creating the output vector Fix a bug introduced in softmax generated code in the generic case Fix the writing of the data in initializer lists for uint8_t types Add correctly new version in RModel.hxx (version 4)