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. |
harrism
left a comment
There was a problem hiding this comment.
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.
|
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.
codereport
left a comment
There was a problem hiding this comment.
lgtm 👍, copyright needs to be updated in both files though
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.