Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add index initialization in the block loop for index_sample kernel when dealing with a input tensor whose shape is larger than block_dim * grid_dim #39736

Merged
merged 7 commits into from
Feb 20, 2022

Conversation

FlyingQianMM
Copy link
Contributor

@FlyingQianMM FlyingQianMM commented Feb 18, 2022

PR types

Bug fixes

PR changes

OPs

Describe

When the length of input tensor is large than block_dim * grid_dim,the index_sample kernel would not deal with the exceeding part. So block and grid loop have been added in the kernel. see #37816

But in the block loop, the index has not been initialize, which may cause that the exceeding part would not be computed, so we add the intialization for index of the block loop.

@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

@thisjiang thisjiang left a comment

Choose a reason for hiding this comment

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

LGTM

@FlyingQianMM FlyingQianMM merged commit c6950ab into PaddlePaddle:develop Feb 20, 2022
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