I wrote some codes with multi-thread, i want each thread to use a single GPU
I first run cufft in the main thread, and then create many threads
in each created thread the cufft is used. And all the threads will share the fft plan which is created by the first using.
But I always received some errors from cufft, it said cufft_invalid_value.
Then I move the contents in the created threads into the main thread, let them run in turn in the main thread.
they all work well.
Is it the cufft only run in a single thread? or other reasons?
Or the fft plan can’t be shared in different threads?
By the way, I find cufft is very unstable, any errors which is not related to cufft will result in failure of cufft.
Currently I have to use cufft as a debug tool to find any potential error in my codes. External Image
Thank you.