I wrote a simple program in c++ to use my pytorch model in libtorch 1.7.1. I have CUDA 10.2 on my os,thus I downloaded CUDA 10.2 prebuilt version of libtorch from this link: