Where to find <torch/torch.h>?

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?

Hi,

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 find_package(Torch REQUIRED).

Best regards

Thomas

It’s works!!
Thanks!!:grinning: