[SOT][3.11,3.12.3.14] cpython_internals use PyThreadState_GET error#78708
Merged
SigureMo merged 1 commit intoPaddlePaddle:developfrom Apr 18, 2026
Merged
[SOT][3.11,3.12.3.14] cpython_internals use PyThreadState_GET error#78708SigureMo merged 1 commit intoPaddlePaddle:developfrom
PyThreadState_GET error#78708SigureMo merged 1 commit intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes incorrect CPython thread-state accessor usage in cpython_internals for multiple Python versions by switching from the internal _PyThreadState_GET() to the public PyThreadState_GET() macro.
Changes:
- Update frame-clearing assertions in the Python 3.11, 3.12, and 3.14 internals shims to use
PyThreadState_GET().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| paddle/fluid/pybind/sot/cpython_internals/internals_3_11.c | Replace _PyThreadState_GET() usage with PyThreadState_GET() in frame-clearing assert for Py3.11 path. |
| paddle/fluid/pybind/sot/cpython_internals/internals_3_12.c | Replace _PyThreadState_GET() usage with PyThreadState_GET() in frame-clearing assert for Py3.12 path. |
| paddle/fluid/pybind/sot/cpython_internals/internals_3_14.c | Replace _PyThreadState_GET() usage with PyThreadState_GET() in frame-clearing assert for Py3.14 path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
具体是什么使用错误?写清楚点 |
Member
Author
Done |
SigureMo
approved these changes
Apr 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
修复
cpython_internals中的PyThreadState_GET使用错误._PyThreadState_GET是不对外开放的,会导致 debug 模式编译错误是否引起精度变化
否