Uncontrolled power-off is usually caused by excessive heat buildup.
Use Console.app to examine the logs right before it shut down. Cold start is flagged by a line in the log that says "Boot Time". See what entries are right before that.
also check for kernel panics using this article:
Mac OS X: How to log a kernel panic - Apple Support
.
Mac Pro (Late 2013)'s shutdown problem with Davinchi Resolve 11