"gpu" shouldn’t be a valid argument to the .to() operation.
Could you please post a small code snippet to reproduce this issue and also post information about your setup, i.e. PyTorch, CUDA, version, NVIDIA driver, etc.?