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 the step-counting mechanism for the fallback code path by restricting the condition to fallback cases only.
Updated condition to check only for fallback (code is None and no graph exists)
Removed the non-fallback branch that invoked eval_frame_default and callback update
Adjusted the reference handling of disable_eval_frame
Comments suppressed due to low confidence (2)
paddle/fluid/pybind/sot/eval_frame.c:324
The updated condition limits the check to fallback scenarios, omitting the early return via eval_frame_default and callback update. Please confirm that this removal is intentional and does not affect other fallback code paths.
if (code == Py_None && is_code_without_graph(PyFrame_GET_CODE(frame))) {
paddle/fluid/pybind/sot/eval_frame.c:325
Since disable_eval_frame likely points to one of the singleton PyBool objects (Py_True or Py_False), review if the manual decref/incref is necessary to avoid potential reference mismanagement.
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
我们目前有一个策略,就是针对一个 code,如果连续多次都没有感知到其内有 graph,就直接回退到动态图,这个目前主要针对的应该是有 fallback 的场景,而对于非 fallback,也就是生成了 code 的场景,一般不会没有 graph,就算没有,也应该是在新的 code 里处理而不是在这里
目前处理方式是有问题的,
StepInfoManager
是为每个 original code 来记录 step count,但实际记录的分别如下:这里两者 step 记录的不匹配导致出现如下问题
这里问题只出现在非 fallback 的情况,fallback 的情况因为记录的 code 是统一的,因此不会出问题
而非 fallback 的情况已经生成 code 了,一般不会没有 graph,因此本 PR 移除对该 case 的处理,仅针对 fallback case