1

I'm running on Arch Linux:

I have read in multiple places that kernel invocation is asynchronous with respect to the CPU (will return immediately and allow CPU to continue). However, I'm not getting that behavior.

e.g.

kernel<<<blocks,threads>>>();
printf("print immediately\n"); 
check_cuda_error();

CPU seems to lock up and nothing is printed (likewise nothing else is executed) to the console until kernel is completed. Tested with kernels of all sorts of different execution times (1s, 2s, 3s, etc.) and calculations to make sure it wasn't my kernel.

Is this a driver issue? Or am I misinterpreting something

1 Answer 1

2

I found that when I run outside of X (in a non-graphical environment) I get the expected behavior. My hypothesis is that while my GPU was working hard in the kernel, it wasn't updating the on-screen graphics and therefore appeared to "hang" before printing to the console.

Running from the shell provided the expected results, so I'm considering my own question answered. Comment below with any more insight you might have

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.