RuntimeError: cublas runtime error : resource allocation failed at /opt/conda/conda-bld/pytorch_1524584710464/work/aten/src/THC/THCGeneral.cpp:411

Some people get the error on the second GPU here: Problem of running on the second GPU on Ubuntu
I am using a single tesla k-80. I get this error when doing a linear operation on a 4 by 2048 matrix


Why I am getting this error?

I already screwed up the environment here that this error “RuntimeError: cuda runtime error (77) : an illegal memory access was encountered” was returned on everything. I screwed it up by not following the guideline here: