For a full solution, something needs to be fixed in PyTorch (maybe Python?) or in CUDA.  I just ran the transformer tutorial code in Python directly, w/o PyCharm.  During the run, I momentarily suspended the linux system and then woke it.  Immediately I got errors about CUDA and now CUDA is inaccessible in python, ipython, etc.