I think we can solve this issue here in the forum. 
I just retried my code snippet on a Quadro RTX 8000 with PyTorch master + CUDA10.2 and using the 1.4.0 binaries + CUDA10.1 and still cannot reproduce this issue.
As said before, your code snippet doesn’t seem to use the GPU so are you sure this error is thrown using this code?
Does my code snippet work on your system?