-
Notifications
You must be signed in to change notification settings - Fork 915
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
Fix thrust failure when transfering data from device_vector to host_vector with vectors of size 1 #7382
Fix thrust failure when transfering data from device_vector to host_vector with vectors of size 1 #7382
Conversation
708cc10
to
7811ad4
Compare
@ttnghia can you add a test for this fix? |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #7382 +/- ##
==============================================
Coverage ? 81.79%
==============================================
Files ? 100
Lines ? 16610
Branches ? 0
==============================================
Hits ? 13586
Misses ? 3024
Partials ? 0 Continue to review full report at Codecov.
|
Sure. I've added that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could name things a bit better while we are at it, and I'm not sure about that test.
…s` and change doc for the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. I have made a couple of changes.
BTW, In my own unrelated work I caused some tests to fail and observed these CUDA errors (not crashes) as well. Adding the code from this PR fixed the errors and allowed me to see the differences. Let's get this merged ASAP! |
…ults, not test to see whether a function would crash or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍, copyright needs to be updated in both files though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for reminding me about that. I have updated. |
@gpucibot merge |
This is a fix for the problem that popped up in the bug #6364.
I debug this problem and discovered that thrust crashes only when the vector size is 1. There should not be any problem with the vector size, thus the bug should be due to something else. Finally, I found a fix for this: adding qualifiers
__host__ __device__
to the type transformer.It really weird that without those qualifiers, there is runtime problem only when the vector size is 1.