https://discuss.pytorch.org/t/runtimeerror-cuda-error-cublas-status-alloc-failed-when-calling-cublascreate-handle/78545/13
위 링크 중 답변
The error might also be raised, if you are running out of memory on the GPU and cublas is unable to create the handle.
Could you reduce the batch size and check, if the code is working?
CPU 로 돌렸을 때 문제 없다면 모델이 큰 경우일 확률 높음.