Files
pytorch/docs/libtorch.rst
Anders Papitto a2a7b0c01a Initial documentation for building libtorch (#10087)
Summary:
It's not a particularly pretty process right now, but it may as well
be documented.  I'm not aware of an ideal location for this, so I'm
just dropping it in the docs/ folder for now as recommended by
soumith
Pull Request resolved: https://github.com/pytorch/pytorch/pull/10087

Differential Revision: D9119681

Pulled By: anderspapitto

fbshipit-source-id: cd4afb642f3778c888d66a501bc697d0b0c88388
2018-08-01 09:41:02 -07:00

20 lines
569 B
ReStructuredText

libtorch (C++-only)
===================
The core of pytorch can be built and used without Python. A
CMake-based build system compiles the C++ source code into a shared
object, libtorch.so.
Building libtorch
-----------------
There is a script which wraps the CMake build. Invoke it with
::
cd pytorch
BUILD_TORCH=ON ONNX_NAMESPACE=onnx_torch bash tools/build_pytorch_libs.sh --use-nnpack caffe2
ls torch/lib/tmp_install # output is produced here
ls torch/lib/tmp_install/lib/libtorch.so # of particular interest
Future work will simplify this further.