I am new to CUDA and I was just trying to make a program which utilized a lot of my GPU. The only issue was that I am also using the card for my display and this froze my screen and required me to reboot.
__global__ void cuda_burn(int* sum)
{
int x = 0;
for(int i = 0; i < 1000000000; i++)
{
x += i;
}
atomicAdd(sum, x);
}
I originally launched it like cuda_burn<<<1024, 1024>>>(sum_d); which killed my display. This makes sense to me because I have enough blocks and threads to fully utilize my gpu which leaves no time for the graphics.
Next I tried to launch it like this cuda_burn<<<1, 1024>>>(sum_d); I thought that since I was only using one block that it would not be able to fully utilize the GPU resources and not freeze my display. Unfortunately it still did. Why?
What is also strange is the the mouse does not freeze?
Also is there a better way of unfreezing the display than rebooting?
Currently, CUDA and display tasks cannot run at the same time. While a CUDA kernel is running, regardless of how much or how little it uses the GPU, display tasks will be "frozen".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With