Hello, I am getting this error when compiling PyTorch from source for Windows 10.
Since my GPU (GTX Titan Black) has compute capability version 3.5 and PyTorch current binaries are compatible with >= 3.7 I guess I have to compile it from source for getting support for my device.
I will try to describe the process I have followed:
My environment:
Windows 10
Visual Studio 2017
Anaconda3 2020.02 (Python 3.7.6 64-bit)
CUDA 10.1 with cuDNN 7.6.5
I have followed the instruction from PyTorch github repository for compiling from source for Windows:

  
      
      GitHub
  
  
    

pytorch/pytorch 18

Tensors and Dynamic neural networks in Python with strong GPU acceleration - pytorch/pytorch


  
  
    
    
  
  


As I use Ninja for generating CMake, after clonning the repository I just launch:
python setup.py install
It seems that all ends without error but when I check it in Python, after “import torch” I am getting this error:
Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
Traceback (most recent call last):
File “”, line 1, in 
File “C:\dev\anaconda\lib\site-packages\torch_init_.py”, line 76, in 
ctypes.CDLL(dll)
File “C:\dev\anaconda\lib\ctypes_init_.py”, line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed



If I modify init.py manually at line 76 and add a print to the for loop for getting the dll names loading:
for dll in dlls:
print (dll)
ctypes.CDLL(dll)
The output I get is:
Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type “help”, “copyright”, “credits” or “license” for more information.



import torch
C:\dev\anaconda\lib\site-packages\torch\lib\asmjit.dll
C:\dev\anaconda\lib\site-packages\torch\lib\c10.dll
C:\dev\anaconda\lib\site-packages\torch\lib\c10_cuda.dll
C:\dev\anaconda\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll
Traceback (most recent call last):
File “”, line 1, in 
File “C:\dev\anaconda\lib\site-packages\torch_init_.py”, line 77, in 
ctypes.CDLL(dll)
File “C:\dev\anaconda\lib\ctypes_init_.py”, line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed



Could anyone help me with this issue?
Thanks in advance for your time and your attention.
Regards