Remaining compute kernels after closing an application

Is there a way to know if there are remaining compute kernels in the background, and in the affirmative to remove them (due to an infinite loop for example), after quitting an application?

I fall in this situation sometime, and suspect that the ghost kernels continue to work because, even if I resume control, it seems that I loss GPU resources and that the computer become hot.

At the moment, the only way I found to retrieve the entire resources of the computer, is to restart it.

Replies

You can use Metal System Trace template in Instruments to check if there's any activity on GPU from your process or any other application. Then you can confirm whether lost GPU power comes from your compute kernels or not.

Thanks Ceylo, I'll give it a try, the next time I suspect such a situation!

If applicable, in the case I detect any remaining activity, could it be attached to a killed application? An in this case, would it not be occuring below any monitoring?

  • I am not sure how macOS would behave in case of a infinite loop in a compute kernel: maybe the command buffer would be aborted and fail but this is only a guess. You can explicitly run a compute kernel with an infinite loop if you really want to know :)

Add a Comment