CUDA kernels from non-main thread

Hi,

I am working on a CUDA application that uses multiple CPU threads. Is it possible to have threads other than the main thread access the device under Linux?

The code I’m developing on seems to work fine on Mac OS X, but on Linux I get an error related to X.

Any help will be greatly appreciated.

Alex.-

Yes this can work. I say can cause each thread needs its own CUDA context. So if you allocate memory, you need to do this with the thread that will also access this memory. Or you declare host-memory as portable (pinned portable memory).

Yes this can work. I say can cause each thread needs its own CUDA context. So if you allocate memory, you need to do this with the thread that will also access this memory. Or you declare host-memory as portable (pinned portable memory).