Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

[Compat][3.11] gen KW_NAMES when call breakgraph, enable test_constant_graph.py #375

Merged
merged 3 commits into from
Sep 4, 2023

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Sep 4, 2023

3.11 在发生 CALL 子图打断的时候,除去当前模拟栈、相关 Variable,还会依赖 KW_NAMES 注册的 call_shape,因此如果生成的代码里不包含 KW_NAMES 是会认为是不含 kwargs 的调用,大概率就会发生段错误,因此 KW_NAMES 是需要恢复到生成的字节码里的

原来 KW_NAMES 的模拟执行会提前将 call_shape 设回 None,导致发生打断时其总是 None,因此调整为 CALL 完成后才设回 None

  • test_constant_graph.py ❌ -> ✅

@paddle-bot
Copy link

paddle-bot bot commented Sep 4, 2023

Thanks for your contribution!

@zrr1999 zrr1999 merged commit c64e674 into develop Sep 4, 2023
8 checks passed
@zrr1999 zrr1999 deleted the py311/gen-kwnames-when-call-breakgraph branch September 4, 2023 13:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants