Libtorch include files/library generation

When I get the https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip file from the server I can see that there is all the include headers and libraries. How is this package generated ? Is there a script to generate the contents of this package ? I’m asking this because the build_libtoch.py alone doesn’t copy the include headers into the build folder, what am I missing ? Thank you !

To clarify: what I need is to generate the includes + share (cmake files) folder after building libtorch, I guess a script does that in CI but I wasn’t able to find it.

The pytorch/builder repository should contain all build scripts. I don’t know where the packaging steps are executed right now, so let me know if you get stuck and I can take another look at it.

1 Like

Thanks @ptrblck, Sam Estep helped me with it, the solution was to use makefile install targets, it created a very similar directory tree (w/ libs, includes and the cmake files required to find libs) to the libtorch one that is distributed in the website.

1 Like