Now I'm using ROS to develop a CUDA Project. There are two nodes corresponding to 2 host threads that need to launch 2 different CUDA kernels concurrently.
So I'm wondering:
- Can a single GPU be called by two host threads concurrently, if I didn't use CUDA Stream?(let's say the GPU resources are enough for launching these two kernels simutaneously.)
- If not, Why?
- If I didn't use cuda stream, are these two kernels bound to a single CUDA context or two?
- If I use CUDA stream, are these two kernels bound to a single CUDA context or two?
- If they are in two different CUDA context, how does the GPU handle their launching/operations as they are called concurrently?
I am now using a RTX 3090 with CUDA 11.0, and i9-10900k, which has 10 cores.