[SOT] Skip restore same stack arg when partial fallback #72367
Merged
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不需要处理,因为不会重复