[tmva][sofie] Fix ONNX fusion child indexing#21949
Open
markknoffler wants to merge 1 commit intoroot-project:masterfrom
Open
[tmva][sofie] Fix ONNX fusion child indexing#21949markknoffler wants to merge 1 commit intoroot-project:masterfrom
markknoffler wants to merge 1 commit intoroot-project:masterfrom
Conversation
nodesChildren is keyed by original graph node indices, while the parse loop iterates over nodesOrder positions. Use nodesOrder[i] to retrieve the correct child list for the currently parsed node and avoid incorrect fusion pairing on reordered graphs.
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.
Fixes #21948.
In SOFIE ONNX parsing,
nodesChildrenis keyed by original ONNX node index, while the parsing loop iterates over execution order slots fromnodesOrder.Previously, the parser passed
nodesChildren[i]toParseOperator.For graphs that are not already topologically ordered in file layout, this can pass children for the wrong node and trigger invalid fusion attempts.
This patch fixes the lookup to use the current node id from reordered execution:
nodesChildren[nodesOrder[i]]so fusion decisions are made using the correct child list of the node being parsed.
Why this matters
This bug can cause runtime parse failures on valid models when reorder is required, e.g. wrong
MatMul+Addpairing.Changes
tmva/sofie_parsers/src/RModelParser_ONNX.cxxChecklist
Respected @lmoneta and @sanjibansg,
Could you please review this fix?
Also, I have local bug reproduction scripts but they are currently not in ROOT standard test layout.
Kindly advise if you would like me to add the standardized tests in this PR?
With regards,
Samreedh Bhuyan