How to use C++ api

Hi, I really look forward to 1.0 with the tracing and jit compiling capabilities.

To check it out I am using pytorch-nightly from anaconda right now, and in python torch.jit.trace works, and I can save and load the saved Script/Traced Modules.

In the docs (https://pytorch.org/docs/master/jit.html#torch.jit.ScriptModule.save) it says that I could load it into a standalone C++ api with torch::jit::load(filename) but I dont find any examples on how to use the C++ api, i.e. how to include it into a project etc.

I assume it will be the https://github.com/pytorch/pytorch/tree/master/torch/csrc/api that I have to use but I dont see any build instructions there

Thanks for any help

Hi Johannes,

I am waiting for the same API and documentation to become available. I found a recent tutorial: https://pytorch.org/tutorials/advanced/cpp_export.html, it might help until 1.0 is released.