How to terminate a GPU program

Suppose I wrote a program using CUDA C and then run it. Can I just terminate it using Ctrl+C or Ctrl+D which is used to terminate a normal program running on CPU?



^C will interrupt the GPU process in Linux, but may cause a cascade of multiple failures in other unrelated processes. It’s not recommended.