I’ve written a tutorial on how to setup visual studio 2019 project using libtorch 1.6 https://expoundai.wordpress.com/2020/10/13/setting-up-a-cpp-project-in-visual-studio-2019-with-libtorch-1-6/ 184
The concept should be similar for other versions also.