Possible extension for larger datasets - is it valid?#3
Conversation
|
Successfully used your patch to process a large dataset containing more than 22 million entries. The original code (the CUDA version) was throwing the error |
|
This patch is magic, it makes Lloyd converge in a single iteration. I guess something is wrong. |
|
I was also hitting the After trying a small hardcoded dataset of 20 elements, I loaded in RGB float data for a jpeg that was |
|
After working with a few more example inputs with this, I realized that it does in fact exit after 1 iteration as @vmarkovtsev mentioned in the above. I initially didn't fully grasp his meaning, but it appears only 1 iteration is performed, no matter the threshold. I've reproduced this on several different inputs. This creates quite poor results in some contexts. Something in this patch is possibly leading to an incorrect delta result in the end of the loop? I haven't dug very far yet. |
Hi Serban, I emailed you yesterday about my experiences using your code for larger datasets. And the failure of the reduction when the number of threads exceeds the limit of 1024.
This is my attempt at avoiding this problem. Could you comment on it's validity?
As part of the solution, I used atomic expressions, which unfortunately require compute capability 1.1. There may be other ways to solve it.