Does CUDA work with seperate calls coming from different CPU threads?

Strangley all the evidence I’m amassing from several attempted implementations seems to suggest no! If not why not? It seems especially strange especially when considering that in order to use the async API you have to do host memory allocs using CUDA and even these cannot be done on another thread.

I hope I’m not missing something in the picture completely but all the evidence I’ve seen seems to point to CUDA not recognising handles, memory, etc. that are fine when used in the original thread that created them.

Any help is much appreciated, thanks,

Andy =)

Does nobody know anything about this? It seems like a strange omission if so…

See section 3.3.1 of the CUDA Programming Guide version 2.3 for a discussion on context management. Specifically for your case:

What is implicitly stated in the introduction of chapter 3 is that when you use the runtime API, one context is automatically created for you within each host thread of your process.

Thanks, I haven’t had a chance to look into the whole context thing yet but now I know it may have my answers I will. I like that handle by the way :)