[tmva][sofie] Several Fixes for parsing complex models #22150
Open
lmoneta wants to merge 7 commits into
Open
Conversation
Member
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
guitargeek
approved these changes
May 5, 2026
Contributor
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
requested changes
May 5, 2026
Contributor
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:
Test Results 20 files 20 suites 2d 23h 0m 38s ⏱️ For more details on these failures, see this check. Results for commit 86ad783. ♻️ This comment has been updated with latest results. |
c6caf02 to
80c2c8c
Compare
guitargeek
approved these changes
May 18, 2026
Contributor
guitargeek
left a comment
There was a problem hiding this comment.
Thank you very much for the fixes!
- 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
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)
- Fix Where for initialized and Shape tensors. New impelmentation was not taking into account the Shape tensors. This caused a failure to parse the ATLAS Gnn tracking model - Fix Slice for trivial copying. Use now std::copy since we cannot use alias tensor anymore after the change of using a free function with a const Session - Avoid printing tensor names in the comment of Softmax generated code. There is a issue in the function RModel::CollectTensorMemberNames used to get tensor members from Session. The problem if a tensor is gaving as name "tensor_X" and used as member "tensor_tensor_X" the function assume exists a tensor with name "X". This was causing teh Keras parser to crash. - Fix an issue writing the initialized data when are inf or NaN. Use the function from limits in this case
…pe tensor When output is a param shape tensor the tensor values were not assigned in initialization as in a constant tensor, they need to be set at run time in the infer function because they depend on the provided dynamic shale values Fix also a issue on Windows in the new COnvertValuesTOString implementation dealing with inf values. Create a specialisation for float or double which will handle the infinity values in numerical limits.
Fix some operators when input and/or output is a shape tensors Fix also in Gemm when broadcasting dynamic shape for the bias
When computing the last usage of tensors, the loop on the input tensors of the added operator was not performed correctly. The loop was stopping if an initialized tensor was an input
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.