I am working on a custom layer written in CUDA in the caffe library. My code works fine with CUDA 8 on 1060/70/80 GPUs on Ubuntu 16.04, so I am quite confident in my code.
However, when I run my code on Ubuntu 18.04 with CUDA 10 on my RTX 2080, I have noticed two strange segfaults that seems to happen randomly (not each runtime).
crash 1 :
thrust::device_ptr<int> thrustPtr = thrust::device_pointer_cast(d_buffer); thrust::exclusive_scan(thrustPtr, thrustPtr + nbElem, thrustPtr); // nbElem is 241408
thrust::exclusive_scan(thrust::device, d_buffer, d_buffer + nbElem, d_buffer); // nbElem is 241408
crash 2 :
thrust::device_ptr<float> t_sc(dev_sc); thrust::device_ptr<int> t_ind(dev_ind); thrust::stable_sort_by_key(t_sc, t_sc + nbElem, t_ind, thrust::greater<float>()); // nbElem is 20412
These two segfaults are related to thrust functions
Are there known issues with the thrust version in CUDA 10 ?