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

Make the CUDA kernel of concat correct and fix unit tests. #11541

Merged
merged 2 commits into from
Jun 19, 2018

Conversation

qingqing01
Copy link
Contributor

Fix #11540

T curr_col_offset;
while ((curr_col_offset = input_cols[curr_segment + 1]) <= tid_x) {
int curr_segment = 0;
int curr_offset = input_cols[0];
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that line 31~32 can be out of loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

@chengduoZH
Copy link
Contributor

@qingqing01
I know the reason what causes the illegal memory access, I use T as the type of curr_col_offset, when the T is a float, and the input shape is too big to excess the representation of a float, it will cause the program to crash. It is my fault.

Copy link
Contributor

@chengduoZH chengduoZH left a comment

Choose a reason for hiding this comment

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

LGTM

@qingqing01 qingqing01 merged commit 9c90dc9 into PaddlePaddle:develop Jun 19, 2018
@qingqing01 qingqing01 deleted the concat_cuda_kernel branch November 14, 2019 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