You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work with Thrust shipped with CUDA 9, Linux x64, Volta GPU.
Initially we had the following code to check whether we can find value X in the array:
auto it=thrust::find_if(p, p+num_rows, is_equal_to(X);
returnit!= (p+num_rows);
but its speed was 27 GB/s, i.e. 30x slower than Volta memory speed.
I changed it to the following code, which was only 5x slower than memory speed:
auto nulls_count = thrust::count(p, p + num_rows, X);
return (nulls_count > 0);
Finally I tried this code, but it had the same speed as thrust::find_if:
returnthrust::any_of(p, p+num_rows, _1==X);
Now i'm going to write my own kernel. Hopefully, you can improve at least find_if and any_of to be as fast as count, and ideally I like to see them all working at full Volta memory speed. Average array size in my tests is about 64 MB (8M elements), so i think it's not startup time problem.
Activity
Merge pull request NVIDIA#712 from senior-zero/enh-main/github/scan_s…
alliepiper commentedon Mar 2, 2024
Closing as a duplicate of #720. Both issues have the same underlying cause and there's more discussion on the other one.