Why does this cuda program freeze my display?

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?

Answers


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".


Need Your Help

How to reset auto increment in laravel user deletion?

php laravel laravel-4 eloquent

I have been struggling to find out a way to reset the auto increment value in Laravel 4 but it seems that this functionality is not embedded in laravel 4 at least for now.

border-color with multiple colors

css css3 css-shapes linear-gradients border-color

I found some information about border-color and it turns out, that you can specify each of the borders with different colors. My question here is following: Is it possible to specify the left borde...