Skip to content

Introduce PlaceEnv for device context management#1215

Open
PlumBlossomMaid wants to merge 1 commit intoPaddlePaddle:masterfrom
PlumBlossomMaid:PlaceEnv
Open

Introduce PlaceEnv for device context management#1215
PlumBlossomMaid wants to merge 1 commit intoPaddlePaddle:masterfrom
PlumBlossomMaid:PlaceEnv

Conversation

@PlumBlossomMaid
Copy link
Contributor

Add a new API for device environment switching using context managers and decorators in Paddle.

Add a new API for device environment switching using context managers and decorators in Paddle.
@paddle-bot
Copy link

paddle-bot bot commented Feb 13, 2026

你的PR提交成功,感谢你对开源项目的贡献!
请检查PR提交格式和内容是否完备,具体请参考示例模版
Your PR has been submitted. Thanks for your contribution!
Please check its format and content. For this, you can refer to Template and Demo.

@PlumBlossomMaid
Copy link
Contributor Author

其实我觉得PlaceEnv这个类最重要的地方在于增加了函数装饰器功能,但是无法做到线程安全,因为paddle框架在python层对于设备的管理本来就不是线程安全的Issue 77927。所以我将继续设计python底层线程安全的设计RFC,但是这个RFC仍然有参考意义。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant