You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a bug in partial fallback handling when duplicate stack variables are encountered by skipping re-restoring variables that have already been processed. Key changes include:
Adding new test cases in test/sot/test_min_graph_size.py to validate the fallback mechanism.
Updating _restore_origin_opcode in function_graph.py to track and skip duplicate stack variable IDs using a set and calling gen_pop_top for duplicates.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File
Description
test/sot/test_min_graph_size.py
Added test functions to verify proper recovery of duplicate args during fallback.
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.
PR Category
Execute Infrastructure
PR Types
Bug fixes
Description
问题出现在子图大小低于
MIN_GRAPH_SIZE
的 partial fallback 处理处与
_build_compile_fn_with_name_store
不同,这里传入的stack_vars
是可能有重复的,因此当同一个变量在前面迭代分配了名字后并存到store_var_info
后,后面迭代的时候就走到了 else 分支,就会走gen_store
,但这明明是___graph_fn_saved_orig_
生成的,就无法在原来函数名字里找到,会挂掉,进而导致整个函数 fallback因此,存过了就直接
POP_TOP
就好了_build_compile_fn_with_name_store
不需要处理,因为不会重复