Skip to content

Conversation

AnnaTrainingG
Copy link
Contributor

@AnnaTrainingG AnnaTrainingG commented Oct 21, 2021

PR types

Bug fixes

PR changes

APIS

Describe

  • Fix a bug in ReadData, ReadDataBc and ReadDataReduce when NX != 1
  • Update the implement of reduceAnyKernel according to kernel primitive api

问题描述:
在进行2D数据读取时,线程数据访问起始位置设置成 threadIdx.x * NX, 对于带stride的读取方式,正确的线程数据起始位置应该为 threadIdx.x; 原始情况会出现数据访存越界的情况,如下图所示:
截屏2021-10-21 上午10 43 47

出错的场景: 当使用大Kernel Primitive API 中的 2D 数据读取时, 只要将NX 设置成大于 1的数就会报错。

出错case: 当前实现并未涉及 NX > 1 的case

…ddlePaddle#36373)

* Fix a bug in ReadData, ReadDataBc and ReadDataReduce when NX != 1
* Update the implement of reduceAnyKernel according to kernel primitive api
@paddle-bot-old
Copy link

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

@paddle-bot-old
Copy link

paddle-bot-old bot commented Oct 21, 2021

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@lanxianghit lanxianghit merged commit 6840cf5 into PaddlePaddle:release/2.2 Oct 22, 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