Getting error "RuntimeError: cuda runtime error (8) : invalid device function at /pytorch/torch/lib/THC/THCTensorCopy.cu:204"


(John) #1

I am getting this error:

“RuntimeError: cuda runtime error (8) : invalid device function at /pytorch/torch/lib/THC/THCTensorCopy.cu:204”

and also the message:

" THCudaCheck FAIL file=/pytorch/torch/lib/THC/THCTensorCopy.cu line=204 error=8 : invalid device function"

In a different thread, I was told that Pytorch will take care of properly installing everything needed fro CUDA if it is available on a computer. So my code simply checks if cuda is available, then either uses CUDA or not.
This seems to work on some computers but not on the one where I get the error message above.

This seems to indicate the Pytorch first tells me that CUDA is available but then gets a problem actually using it?