Hi All, I am facing the same problem. I realized that when I installed PyTorch using the command - conda install pytorch torchvision cudatoolkit=10.2 -c pytorch it is not installing the CUDA compiled torch. I confirmed it using
>>> torch.has_cuda
False
The installation logs, for the above install command is as below -
environment location: F:\Softwares\anaconda
added / updated specs:
- cudatoolkit=10.2
- pytorch
- torchvision
The following NEW packages will be INSTALLED:
ninja pkgs/main/win-64::ninja-1.9.0-py37h74a9793_0
pytorch pytorch/win-64::pytorch-1.5.0-py3.7_cpu_0
torchvision pytorch/win-64::torchvision-0.6.0-py37_cpu
My deviceQuery result shows -
Device 0: "GeForce MX250"
CUDA Driver Version / Runtime Version 10.2 / 10.2
CUDA Capability Major/Minor version number: 6.1
Texture alignment: zu bytes
Concurrent copy and kernel execution: Yes with 5 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display Driver Model)
Device supports Unified Addressing (UVA): Yes
Device supports Compute Preemption: Yes
Supports Cooperative Kernel Launch: No
Supports MultiDevice Co-op Kernel Launch: No
Device PCI Domain ID / Bus ID / location ID: 0 / 2 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.2, CUDA Runtime Version = 10.2, NumDevs = 1, Device0 = GeForce MX250
Result = PASS
Driver version - 441.22
The only different thing I have is - CUDA toolkit and anaconda are in different drives.
Update
When I tried with 10.1 variant of CUDA(conda install pytorch torchvision cudatoolkit=10.1 -c pytorch), just as @peterjc123 suggested, I still see that conda is trying to install non cuda version of pytorch -
The following packages will be downloaded:
package | build
---------------------------|-----------------
cudatoolkit-10.1.243 | h74a9793_0 300.3 MB
------------------------------------------------------------
Total: 300.3 MB
The following NEW packages will be INSTALLED:
ninja pkgs/main/win-64::ninja-1.9.0-py37h74a9793_0
pytorch pytorch/win-64::pytorch-1.5.0-py3.7_cpu_0
torchvision pytorch/win-64::torchvision-0.6.0-py37_cpu
The following packages will be DOWNGRADED:
cudatoolkit 10.2.89-h74a9793_1 --> 10.1.243-h74a9793_0