-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix initialization of same_node_ in TreeEnsemble #24654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can commit the suggested changes from lintrunner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Thanks for looking into this so quickly!
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/azp run build_x64_release |
No pipelines are associated with this pull request. |
Description
For TreeEnsemble, onnxruntime tries to fuse multiple nodes BRANCH_EQ into one node BRANCH_MEMBER. When a tree only contains BRANCH_EQ nodes, the final tree could be a mix between BRANCH_EQ and BRANCH_MEMBER. To be more efficient, onnxruntime detects that all the nodes use the same rule and avoids checking that value for every node while getting the final leaf. This detection happened before the fusion into BRANCH_MEMBER. This PR detects that this check must be done again. This extra cost only happens when a tree only contains nodes BRANCH_EQ and should not be much. It only happens during the initialization.
Motivation and Context
Fixes issue #24636.