The output of nvidia-smi indicates that PyTorch is not using the GPU at all, as the CUDA context alone would use more than 4MB (approx. 700MB).
Is this error reproducible in the linear layer? If so, could you post the setup of the layer as well as the input shape?
Are you seeing the same error, if you lower the batch size?