Skip to content

Conversation

@Tongkaio
Copy link
Member

PR types

Bug fixes

PR changes

Others

Description

修复IndexPutKernel的bug:当其他设备如npu调用index_put_时,因为index_put_是原地修改,所以输入x和out会指向同一个地址,当npu检查到缺少index_put_算子而fallback到cpu时,此时输入x被copy到cpu,而输出out仍留在npu,IndexPutKerne中并未对这种情况进行判断,导致out的数据并未被拷贝过来。于是加上判断并将数据拷贝到cpu,问题修复。

@paddle-bot
Copy link

paddle-bot bot commented Feb 20, 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.

Copy link
Contributor

@YanhuiDua YanhuiDua left a comment

Choose a reason for hiding this comment

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

LGTM

@Tongkaio Tongkaio requested a review from Courtesy-Xs February 20, 2024 13:25
@YanhuiDua YanhuiDua merged commit e1c7b56 into PaddlePaddle:develop Feb 21, 2024
@Tongkaio Tongkaio deleted the fix_index_put branch April 1, 2024 05:26
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