Avoid GPUs with CUDA version of PyTorch?

Am I able to use PyTorch’s CUDA version without actually using GPUs? I intend to install on a shared server, where the GPU queue is sometimes full enough that running just on CPU would be faster.

If so, this would certainly beat separate virtual environments with different PyTorch versions in each.

pytorch has same version for CPU and GPU. It works everywhere with the same binaries.
The GPU part of pytorch is only activated if you call .cuda() on something.

Interesting. Then why are there separate installations for CUDA and non-CUDA?

if you carefully see, they are not separate. if you see the actual command to execute, it’s the same.

1 Like