how to use the same CUDA context in several CPU threads?

any ideas?

any ideas?

Create the context and pass the pointer to all threads…

And then, each thread would acquire a lock and then push the context… and then when done, it would pop the context and release the lock…

Sample use cases can be seen in “cudaVideoDecode” SDK sample (nvcuvid library).

Create the context and pass the pointer to all threads…

And then, each thread would acquire a lock and then push the context… and then when done, it would pop the context and release the lock…

Sample use cases can be seen in “cudaVideoDecode” SDK sample (nvcuvid library).

thanks very much, I’ll try it.

thanks very much, I’ll try it.