Skip to content

Conversation

veyron95
Copy link
Contributor

@veyron95 veyron95 commented Nov 15, 2021

PR types

Bug fixes

PR changes

APIs

Describe

PR36965 : VarBase provides a '_to' interface that copies the current varbase to target device and dtype.
同时修改 place 和 dtype 将存在 bug,例如:框架的 device 设置为 place1,通过 copy_to() 得到 place2 上的数据 new_t,如果在 place1 上对 place2 上的 new_t 调用 cast 操作将会有 bug。

参考 layer.to 的修复PR #37156

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@JiabinYang JiabinYang left a comment

Choose a reason for hiding this comment

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

LGTM

@JiabinYang JiabinYang merged commit f29a3c6 into PaddlePaddle:develop Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants