fix(backend): inherit PassMgrBackend and raise RuntimeError on no-match#86
Open
xjtu-L wants to merge 3 commits intoPaddlePaddle:developfrom
Open
fix(backend): inherit PassMgrBackend and raise RuntimeError on no-match#86xjtu-L wants to merge 3 commits intoPaddlePaddle:developfrom
xjtu-L wants to merge 3 commits intoPaddlePaddle:developfrom
Conversation
Contributor
xjtu-L
commented
May 6, 2026
- Replace manual config/pass_manager construction with super().init(config), overriding get_passes() for FixedPatternReplacementPass
- Raise RuntimeError when no passes modify the graph, preventing fallback to eager execution
91f7721 to
cc2dd97
Compare
PassMgrDirectBackend now inherits GraphCompilerBackend directly, with its own dispatch infrastructure, pass loading, source validation, and FixedPatternReplacementPass. This eliminates the coupling with PassMgrBackend so changes to one backend don't affect the other.
cc2dd97 to
2b39460
Compare
The pass match status was not being written to the result file, causing the evaluator to always report an empty list for "Has Any pass matched?". Added the same write logic that PassMgrBackend already has.
a793fae to
02bd602
Compare
…args Two bugs fixed in PassMgrDirectBackend: 1. _original_input_tensors never set when model is called with **input_dict and forward signature uses *args/**kwargs (so _param_names is empty). Added elif kwargs fallback using kwargs.values() order. 2. _finalize_gm() would pass None to _reorder_placeholders when _original_input_tensors was not set. Added None guard.
f57b4cd to
fd14ef7
Compare
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.