Skip to content
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

[SOT][3.12] Fix that frame in eval custom code was not released in tstate - step 2 #62470

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

gouzil
Copy link
Member

@gouzil gouzil commented Mar 6, 2024

PR types

Bug fixes

PR changes

Others

Description

背景:

我们在 #61703 修改了对 frame 的管理,但是并没有考虑到 PyObject_CallObject 是 error 的情况, 反应到代码上就是 PyObject_CallObject 的结果为 NULL

具体表现就是,当有assertRaises 检查和 try 运行失败的时候,会导致frame没能正常释放

TODO:

在支持的同时发现了另一个问题,是由 log 导致的

复现方式:

export SOT_LOG_LEVEL=9 COST_MODEL=False MIN_GRAPH_SIZE=0 STRICT_MODE=True FLAGS_cudnn_deterministic=False

python test/sot/test_simulate_initialize.py TestInit.test_created_layer_reconstruct

SOT_LOG_LEVEL 设置为 3 以上即可, 目前定位是在python/paddle/jit/sot/opcode_translator/eval_frame_callback.pyprint_locals函数

相关链接:

Copy link

paddle-bot bot commented Mar 6, 2024

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Mar 6, 2024
@gouzil gouzil requested a review from SigureMo March 6, 2024 08:43
@SigureMo SigureMo self-assigned this Mar 6, 2024
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@gouzil gouzil merged commit 600bdd5 into PaddlePaddle:develop Mar 7, 2024
30 checks passed
@gouzil gouzil deleted the sot_fix_clear_thread_frame branch March 7, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants