It is “high” because cudaThreadSynchronize() is effectively a spin lock which polls the GPU at rather high frequency, waiting until the GPU kernel is finished. Because the CPU thread is just sitting in a polling loop, it actually isn’t doing much work. Since CUDA 2.3, I understand you can control the frequency of polling if it really bothers you.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
100% CPU usage when running CUDA code | 5 | 5055 | October 31, 2023 | |
CPU Usage | 6 | 1725 | October 5, 2009 | |
Host CPU busy while waiting ? | 3 | 2144 | May 5, 2009 | |
Putting the host process to sleep during kernel execution | 3 | 2901 | September 27, 2009 | |
CPU core is busy while GPU runs its kernel | 11 | 5275 | February 11, 2018 | |
CPU usage high while in kernel call | 2 | 9071 | October 30, 2007 | |
CPU Spins while waiting for GPU to finish computation | 6 | 1450 | March 2, 2023 | |
100% CPU use while waiting for kernel | 7 | 4670 | July 10, 2008 | |
letting the host thread sleep in 2.2? | 8 | 4346 | July 1, 2009 | |
CPU is 100% busy during kernel execution | 1 | 4460 | October 16, 2009 |