I cannot reproduce the issue on a Windows system using the same command so I guess your environment might have multiple PyTorch binaries installed (and the CPU-only one is picked),
Output:
conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
Collecting package metadata (current_repodata.json): done
...
added / updated specs:
- pytorch
- pytorch-cuda=11.8
- torchvision
The following packages will be downloaded:
package | build
---------------------------|-----------------
brotlipy-0.7.0 |py38h2bbff1b_1003 412 KB
cffi-1.15.1 | py38h2bbff1b_3 238 KB
cryptography-39.0.1 | py38h21b164f_0 1.0 MB
cuda-cccl-12.1.55 | 0 1.2 MB nvidia
cuda-cudart-dev-11.8.89 | 0 723 KB nvidia
cuda-cupti-11.8.87 | 0 11.5 MB nvidia
cuda-libraries-dev-11.8.0 | 0 1 KB nvidia
cuda-nvrtc-dev-11.8.89 | 0 16.1 MB nvidia
cuda-profiler-api-12.1.55 | 0 18 KB nvidia
cuda-runtime-11.8.0 | 0 1 KB nvidia
filelock-3.9.0 | py38haa95532_0 19 KB
flit-core-3.8.0 | py38haa95532_0 85 KB
freetype-2.12.1 | ha860e81_0 490 KB
giflib-5.2.1 | h8cc25b3_3 88 KB
idna-3.4 | py38haa95532_0 94 KB
jinja2-3.1.2 | py38haa95532_0 211 KB
jpeg-9e | h2bbff1b_1 320 KB
libcublas-dev-11.11.3.6 | 0 375.9 MB nvidia
libcufft-dev-10.9.0.58 | 0 144.6 MB nvidia
libcurand-10.3.2.56 | 0 3 KB nvidia
libcurand-dev-10.3.2.56 | 0 50.0 MB nvidia
libcusolver-dev-11.4.1.48 | 0 94.1 MB nvidia
libcusparse-dev-11.7.5.86 | 0 175.7 MB nvidia
libdeflate-1.17 | h2bbff1b_0 151 KB
libnpp-dev-11.8.0.86 | 0 143.2 MB nvidia
libpng-1.6.39 | h8cc25b3_0 369 KB
libtiff-4.5.0 | h6c2663c_2 1.2 MB
libuv-1.44.2 | h2bbff1b_0 288 KB
libwebp-1.2.4 | hbc33d0d_1 73 KB
libwebp-base-1.2.4 | h2bbff1b_1 304 KB
lz4-c-1.9.4 | h2bbff1b_0 143 KB
markupsafe-2.1.1 | py38h2bbff1b_0 26 KB
mkl-service-2.4.0 | py38h2bbff1b_0 51 KB
mkl_fft-1.3.1 | py38h277e83a_0 139 KB
mkl_random-1.2.2 | py38hf11a4ad_0 225 KB
networkx-2.8.4 | py38haa95532_1 2.6 MB
numpy-1.23.5 | py38h3b20f71_0 11 KB
numpy-base-1.23.5 | py38h4da318b_0 6.0 MB
pillow-9.4.0 | py38hd77b12b_0 1015 KB
pyopenssl-23.0.0 | py38haa95532_0 97 KB
pysocks-1.7.1 | py38haa95532_0 31 KB
pytorch-2.0.0 |py3.8_cuda11.8_cudnn8_0 1.35 GB pytorch
pytorch-cuda-11.8 | h24eeafa_3 7 KB pytorch
pytorch-mutex-1.0 | cuda 3 KB pytorch
requests-2.28.1 | py38haa95532_1 98 KB
torchvision-0.15.0 | py38_cu118 7.7 MB pytorch
urllib3-1.26.15 | py38haa95532_0 194 KB
win_inet_pton-1.1.0 | py38haa95532_0 35 KB
xz-5.2.10 | h8cc25b3_1 520 KB
zlib-1.2.13 | h8cc25b3_0 113 KB
zstd-1.5.4 | hd43e919_0 683 KB
------------------------------------------------------------
Total: 2.37 GB
The following NEW packages will be INSTALLED:
blas pkgs/main/win-64::blas-1.0-mkl None
brotlipy pkgs/main/win-64::brotlipy-0.7.0-py38h2bbff1b_1003 None
cffi pkgs/main/win-64::cffi-1.15.1-py38h2bbff1b_3 None
charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0 None
cryptography pkgs/main/win-64::cryptography-39.0.1-py38h21b164f_0 None
cuda-cccl nvidia/win-64::cuda-cccl-12.1.55-0 None
cuda-cudart nvidia/win-64::cuda-cudart-11.8.89-0 None
cuda-cudart-dev nvidia/win-64::cuda-cudart-dev-11.8.89-0 None
cuda-cupti nvidia/win-64::cuda-cupti-11.8.87-0 None
cuda-libraries nvidia/win-64::cuda-libraries-11.8.0-0 None
cuda-libraries-dev nvidia/win-64::cuda-libraries-dev-11.8.0-0 None
cuda-nvrtc nvidia/win-64::cuda-nvrtc-11.8.89-0 None
cuda-nvrtc-dev nvidia/win-64::cuda-nvrtc-dev-11.8.89-0 None
cuda-nvtx nvidia/win-64::cuda-nvtx-11.8.86-0 None
cuda-profiler-api nvidia/win-64::cuda-profiler-api-12.1.55-0 None
cuda-runtime nvidia/win-64::cuda-runtime-11.8.0-0 None
filelock pkgs/main/win-64::filelock-3.9.0-py38haa95532_0 None
flit-core pkgs/main/win-64::flit-core-3.8.0-py38haa95532_0 None
freetype pkgs/main/win-64::freetype-2.12.1-ha860e81_0 None
giflib pkgs/main/win-64::giflib-5.2.1-h8cc25b3_3 None
idna pkgs/main/win-64::idna-3.4-py38haa95532_0 None
intel-openmp pkgs/main/win-64::intel-openmp-2021.4.0-haa95532_3556 None
jinja2 pkgs/main/win-64::jinja2-3.1.2-py38haa95532_0 None
jpeg pkgs/main/win-64::jpeg-9e-h2bbff1b_1 None
lerc pkgs/main/win-64::lerc-3.0-hd77b12b_0 None
libcublas nvidia/win-64::libcublas-11.11.3.6-0 None
libcublas-dev nvidia/win-64::libcublas-dev-11.11.3.6-0 None
libcufft nvidia/win-64::libcufft-10.9.0.58-0 None
libcufft-dev nvidia/win-64::libcufft-dev-10.9.0.58-0 None
libcurand nvidia/win-64::libcurand-10.3.2.56-0 None
libcurand-dev nvidia/win-64::libcurand-dev-10.3.2.56-0 None
libcusolver nvidia/win-64::libcusolver-11.4.1.48-0 None
libcusolver-dev nvidia/win-64::libcusolver-dev-11.4.1.48-0 None
libcusparse nvidia/win-64::libcusparse-11.7.5.86-0 None
libcusparse-dev nvidia/win-64::libcusparse-dev-11.7.5.86-0 None
libdeflate pkgs/main/win-64::libdeflate-1.17-h2bbff1b_0 None
libnpp nvidia/win-64::libnpp-11.8.0.86-0 None
libnpp-dev nvidia/win-64::libnpp-dev-11.8.0.86-0 None
libnvjpeg nvidia/win-64::libnvjpeg-11.9.0.86-0 None
libnvjpeg-dev nvidia/win-64::libnvjpeg-dev-11.9.0.86-0 None
libpng pkgs/main/win-64::libpng-1.6.39-h8cc25b3_0 None
libtiff pkgs/main/win-64::libtiff-4.5.0-h6c2663c_2 None
libuv pkgs/main/win-64::libuv-1.44.2-h2bbff1b_0 None
libwebp pkgs/main/win-64::libwebp-1.2.4-hbc33d0d_1 None
libwebp-base pkgs/main/win-64::libwebp-base-1.2.4-h2bbff1b_1 None
lz4-c pkgs/main/win-64::lz4-c-1.9.4-h2bbff1b_0 None
markupsafe pkgs/main/win-64::markupsafe-2.1.1-py38h2bbff1b_0 None
mkl pkgs/main/win-64::mkl-2021.4.0-haa95532_640 None
mkl-service pkgs/main/win-64::mkl-service-2.4.0-py38h2bbff1b_0 None
mkl_fft pkgs/main/win-64::mkl_fft-1.3.1-py38h277e83a_0 None
mkl_random pkgs/main/win-64::mkl_random-1.2.2-py38hf11a4ad_0 None
mpmath pkgs/main/win-64::mpmath-1.2.1-py38haa95532_0 None
networkx pkgs/main/win-64::networkx-2.8.4-py38haa95532_1 None
numpy pkgs/main/win-64::numpy-1.23.5-py38h3b20f71_0 None
numpy-base pkgs/main/win-64::numpy-base-1.23.5-py38h4da318b_0 None
pillow pkgs/main/win-64::pillow-9.4.0-py38hd77b12b_0 None
pycparser pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0 None
pyopenssl pkgs/main/win-64::pyopenssl-23.0.0-py38haa95532_0 None
pysocks pkgs/main/win-64::pysocks-1.7.1-py38haa95532_0 None
pytorch pytorch/win-64::pytorch-2.0.0-py3.8_cuda11.8_cudnn8_0 None
pytorch-cuda pytorch/win-64::pytorch-cuda-11.8-h24eeafa_3 None
pytorch-mutex pytorch/noarch::pytorch-mutex-1.0-cuda None
requests pkgs/main/win-64::requests-2.28.1-py38haa95532_1 None
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1 None
sympy pkgs/main/win-64::sympy-1.11.1-py38haa95532_0 None
tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0 None
torchvision pytorch/win-64::torchvision-0.15.0-py38_cu118 None
typing_extensions pkgs/main/win-64::typing_extensions-4.4.0-py38haa95532_0 None
urllib3 pkgs/main/win-64::urllib3-1.26.15-py38haa95532_0 None
win_inet_pton pkgs/main/win-64::win_inet_pton-1.1.0-py38haa95532_0 None
xz pkgs/main/win-64::xz-5.2.10-h8cc25b3_1 None
zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0 None
zstd pkgs/main/win-64::zstd-1.5.4-hd43e919_0 None
...
>>> import torch
>>> torch.version.cuda
'11.8'
>>> torch.__version__
'2.0.0'
>>> x = torch.randn(1).cuda()
>>> x
tensor([1.7900], device='cuda:0')