PyTorch runs on CPU instead of 4090, Windows 11

I’m using the nightly PyTorch (for CUDA 11.8) installed with conda, conda was installed with the standard visual installer.

python -m torch.utils.collect_env

Collecting environment information...
PyTorch version: 2.0.0.dev20230130
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.25.2
Libc version: N/A

Python version: 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22621-SP0
Is CUDA available: False
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090
Nvidia driver version: 528.24
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.4.0
[pip3] rotary-embedding-torch==0.2.1
[pip3] torch==2.0.0.dev20230130
[pip3] torchaudio==2.0.0.dev20230130
[pip3] torchvision==0.15.0.dev20230130
[conda] blas                      1.0                         mkl
[conda] mkl                       2021.4.0           haa95532_640
[conda] mkl-service               2.4.0            py39h2bbff1b_0
[conda] mkl_fft                   1.3.1            py39h277e83a_0
[conda] mkl_random                1.2.2            py39hf11a4ad_0
[conda] numpy                     1.20.0                   pypi_0    pypi
[conda] numpy-base                1.21.5           py39hca35cd5_3
[conda] numpydoc                  1.4.0            py39haa95532_0
[conda] pytorch                   2.0.0.dev20230130     py3.9_cpu_0    pytorch-nightly
[conda] pytorch-cuda              11.8                 h8dd9ede_2    pytorch-nightly
[conda] pytorch-mutex             1.0                         cpu    pytorch-nightly
[conda] rotary-embedding-torch    0.2.1                    pypi_0    pypi
[conda] torchaudio                2.0.0.dev20230130        py39_cpu    pytorch-nightly
[conda] torchvision               0.15.0.dev20230130        py39_cpu    pytorch-nightly

Using stable PyTorch with CUDA 11.7 has the same issue

Collecting environment information...
PyTorch version: 1.13.1
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.25.2
Libc version: N/A

Python version: 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22621-SP0
Is CUDA available: False
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090
Nvidia driver version: 528.24
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.4.0
[pip3] rotary-embedding-torch==0.2.1
[pip3] torch==1.13.1
[pip3] torchaudio==0.13.1
[pip3] torchvision==0.14.1
[conda] blas                      1.0                         mkl
[conda] mkl                       2021.4.0           haa95532_640
[conda] mkl-service               2.4.0            py39h2bbff1b_0
[conda] mkl_fft                   1.3.1            py39h277e83a_0
[conda] mkl_random                1.2.2            py39hf11a4ad_0
[conda] numpy                     1.20.0                   pypi_0    pypi
[conda] numpy-base                1.21.5           py39hca35cd5_3
[conda] numpydoc                  1.4.0            py39haa95532_0
[conda] pytorch                   1.13.1              py3.9_cpu_0    pytorch
[conda] pytorch-cuda              11.7                 h67b0de4_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch-nightly
[conda] rotary-embedding-torch    0.2.1                    pypi_0    pypi
[conda] torchaudio                0.13.1                 py39_cpu    pytorch
[conda] torchvision               0.14.1                 py39_cpu    pytorch

I don’t know why (as I’m not using Windows), but the CPU-only binaries were installed as indicate by the cpu tag:

[conda] pytorch                   2.0.0.dev20230130     py3.9_cpu_0    pytorch-nightly

Maybe try to install the pip wheels and see if this would work.

I used

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch-nightly -c nvidia

and

conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia

to install these versions. Is there a convenient way to prohibit installing the CPU version with Conda?

Trying to install the wheels with this command now

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu118

Will report back how it goes

there is no wheel for 11.8
You still can install 11.7 wheel on cuda 11.8 but then if you intend to use puytroch 2.0 with sm_89 arch you’ll need to re-install triton on your own for now.

That works, I’ve confirmed it by running tortoise-tts about 100 times faster than my 7950X did.
Thanks for the help. Maybe Conda shouldn’t be recommended by default on the website?

Collecting environment information...
PyTorch version: 2.0.0.dev20230129+cu118
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 11 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.25.2
Libc version: N/A

Python version: 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.22621-SP0
Is CUDA available: True
CUDA runtime version: 11.7.99
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090
Nvidia driver version: 528.24
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.4.0
[pip3] rotary-embedding-torch==0.2.1
[pip3] torch==2.0.0.dev20230129+cu118
[pip3] torchaudio==2.0.0.dev20230130+cu118
[pip3] torchvision==0.15.0.dev20230130+cu118
[conda] blas                      1.0                         mkl
[conda] mkl                       2021.4.0           haa95532_640
[conda] mkl-service               2.4.0            py39h2bbff1b_0
[conda] mkl_fft                   1.3.1            py39h277e83a_0
[conda] mkl_random                1.2.2            py39hf11a4ad_0
[conda] numpy                     1.20.0                   pypi_0    pypi
[conda] numpy-base                1.21.5           py39hca35cd5_3
[conda] numpydoc                  1.4.0            py39haa95532_0
[conda] pytorch-cuda              11.7                 h67b0de4_0    pytorch
[conda] pytorch-mutex             1.0                         cpu    pytorch-nightly
[conda] rotary-embedding-torch    0.2.1                    pypi_0    pypi
[conda] torch                     2.0.0.dev20230129+cu118          pypi_0    pypi
[conda] torchaudio                2.0.0.dev20230130+cu118          pypi_0    pypi
[conda] torchvision               0.15.0.dev20230130+cu118          pypi_0    pypi

I see that it still installed CUDA 11.7 though, as vince mentioned