c++ – Libtorch cannot detect the gpu,but pytorch successfully detects the gpu

Environment:

win10 + vs2017;

python 3.7.7 + pytorch 1.4.0;

libtorch 1.7.0 + cuda 10.1

In python

print(torch.cuda.is_available()) //True

In libtorch

std::cout << torch::cuda::device_count() << std::endl;//0
std::cout << torch::cuda::is_available() << std::endl;//0
std::cout << torch::cuda::cudnn_is_available() << std::endl;//0
std::cout << torch::hasCUDA() << std::endl;//0

And In the