On Mac OS, cuda applications will freeze my system

If no cuda application is running, everything is stable.
Once I try to ran any kinds of cuda applications, in several minutes, the system will freeze. It seems to be a hard freeze, which means that I cannot access the machine even in ssh.

Mac OS X 10.13.4 with 387. (CUDA is 387.178).

Any comments?