Multithreading WIth Jetson Utilities Library (jetson-utils)?

Hello,

Is it possible to use the Jetson C++ Utilities library as is, with a multithreaded application where multiple calls are being made to the cuda convenience libraries on separate threads? Or is a cuda stream required? If it is possible, are there any example available of this? If not, any examples of how to do this?

Thanks

Hi @catch22, the CUDA functions from jetson-utils don’t currently take a cudaStream parameter from the user to run their kernel(s) on (although I’ll add that) - although I’m not sure that they’re strictly required, it’d probably be advised to use multiple streams if possible. Is there an error or issue you are having?

Hi @dusty_nv , Thanks for the response, I’m trying to manipulate multiple camera streams at once with separate threads for each one. The threads are doing the same processing, but concurrently accessing the GPU using the jetson cuda utility library, (resize, crop, ect…). I’m wondering if this is okay to do with multiple threads, or will it cause problems with GPU access? I’m fairly new to cuda programming in general and GPU multithreaded access. Note, I could use a mutex lock to protect the GPU but I really need the threads to be able to run and process as fast as they can. Thanks!