I’m facing the same issue on Windows 10.
I’m using Pytorch 1.7.1cu101 and The drivers are up to date(i.e. 466.11), Pytorch detects the GPU and thus torch.cuda.is_available() returns True, however, its the libtorch that fails! and always returns false.
I have tested with older driver as well (457? I guess) to no avail!
I also uninstalled all versions of cuda toolkits available on the system, hoping that might have had something to do with it, as they were in PATH and they might have caused a conflict with locally shipped dlls from libtorch libs, that wasnt the case either!
So what could be the issue here?
Here is the output of collect_env:
PS C:\Users\user> python collect_env.py
Collecting environment information...
PyTorch version: 1.7.0
Is debug build: True
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Enterprise
GCC version: Could not collect
Clang version: Could not collect
CMake version: version 3.9.0

Python version: 3.7 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.1.105
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080
Nvidia driver version: 466.11
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] numpydoc==0.9.2
[pip] torch==1.7.0
[pip] torchaudio==0.7.0
[pip] torchvision==0.8.1
[conda] blas                      1.0                         mkl
[conda] mkl                       2020.0                      166
[conda] mkl-service               2.3.0            py37hb782905_0
[conda] mkl_fft                   1.0.15           py37h14836fe_0
[conda] mkl_random                1.1.0            py37h675688f_0
[conda] numpy                     1.18.1           py37h93ca92e_0
[conda] numpy-base                1.18.1           py37hc3f5095_1
[conda] numpydoc                  0.9.2                      py_0
[conda] torch                     1.7.0                    pypi_0    pypi
[conda] torchaudio                0.7.0                    pypi_0    pypi
[conda] torchvision               0.8.1                    pypi_0    pypi

Any help is greatly appreciated