I succeed in compiling the code with cmake directly, but when I use vscode for editing, it always get error message with <torch/torch.h> not found. How can I get it?
you need to add the somewhat hidden
<installation dir>/include/torch/csrc/api/include to the includes.
If you create the CMakeLists.txt as in the example, the TorchConfig.cmake should set it up for you up when running