You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
multipy: README updates for Beta + CHANGELOG (#229)
Summary:
This updates the README with some feedback from #212 as well as adds a CHANGELOG for the 0.1 release.
Pull Request resolved: #229
Test Plan: docs only
Reviewed By: anirbanr-fb-r2p, PaliC
Differential Revision: D40691024
Pulled By: d4l3k
fbshipit-source-id: 7b76f7cbc7dc4dbd243b5879f510e3dd8a7c9b59
> :warning:**This is project is still a prototype.** Only Linux x86 is supported, and the API may change without warning. Furthermore, please **USE PYTORCH NIGHTLY** when using `multipy::runtime`!
7
-
8
-
`MultiPy` (formerly `torch::deploy` and `torch.package`) is a system that allows you to run multi-threaded python code in C++. It offers `multipy.package` (formerly `torch.package`) in order to package code into a mostly hermetic format to deliver to `multipy::runtime` (formerly `torch::deploy`) which is a runtime which takes packaged
9
-
code and runs it using multiple embedded Python interpreters in a C++ process without a shared global interpreter lock (GIL). For more information on how `MultiPy` works
6
+
`torch::deploy` (MultiPy for non-PyTorch use cases) is a C++ library that enables you to run eager mode PyTorch models in production without any modifications to your model to support tracing. `torch::deploy` provides a way to run using multiple independent Python interpreters in a single process without a shared global interpreter lock (GIL). For more information on how `torch::deploy` works
10
7
internally, please see the related [arXiv paper](https://arxiv.org/pdf/2104.00254.pdf).
11
8
9
+
To learn how to use `torch::deploy` see [Installation](#installation) and [Examples](#examples).
10
+
11
+
Requirements:
12
+
13
+
* PyTorch 1.13+ or PyTorch nightly
14
+
* Linux (ELF based)
15
+
* x86_64 (Beta)
16
+
* arm64/aarch64 (Prototype)
17
+
18
+
> ℹ️ This is project is in Beta. `torch::deploy` is ready for use in production environments but may have some rough edges that we're continuously working on improving. We're always interested in hearing feedback and usecases that you might have. Feel free to reach out!
19
+
12
20
## Installation
13
21
14
-
### Building `multipy::runtime`via Docker
22
+
### Building via Docker
15
23
16
-
The easiest way to build multipy, along with fetching all interpreter dependencies, is to do so via docker.
24
+
The easiest way to build deploy and install the interpreter dependencies is to do so via docker.
@@ -32,17 +40,23 @@ docker run --rm multipy multipy/runtime/build/test_deploy
32
40
33
41
### Installing via `pip install`
34
42
35
-
We support installing both python modules and the runtime libs using `pip install`, with the caveat of having to manually install the C++ dependencies first. This also serves as a single-command source build, essentially being a wrapper around `python setup.py develop`, once all the dependencies have been installed.
43
+
We support installing both python modules and the runtime libs using `pip
44
+
install`, with the caveat of having to manually install the C++ dependencies
45
+
first. This serves as a single-command source build, essentially being a wrapper
46
+
around `python setup.py develop`, once all the dependencies have been installed.
47
+
48
+
49
+
To start with, the multipy repo should be cloned first:
We support both `conda` and `pyenv`+`virtualenv` to create isolated environments to build and run in. Since `multipy` requires a position-independent version of python to launch interpreters with, for `conda` environments we use the prebuilt `libpython-static=3.x` libraries from `conda-forge` to link with at build time, and for `virtualenv`/`pyenv` we compile python with `-fPIC` to create the linkable library.
> **NOTE** As of 10/11/2022 the linking of prebuilt static fPIC versions of python downloaded from `conda-forge` can be problematic on certain systems (for example Centos 8), with linker errors like `libpython_multipy.a: error adding symbols: File format not recognized`. This seems to be an issue with `binutils`, and the steps in https://wiki.gentoo.org/wiki/Project:Toolchain/Binutils_2.32_upgrade_notes/elfutils_0.175:_unable_to_initialize_decompress_status_for_section_.debug_info can help. Alternatively, the user can go with the `virtualenv`/`pyenv` flow above.
127
141
142
+
## Development
128
143
129
-
### Running `multipy::runtime` build steps from source
144
+
### Manually building `multipy::runtime` from source
130
145
131
-
Both `docker` and `pip install` options above are wrappers around the `cmake build` of multipy's runtime. If the user wishes to run the build steps manually instead, as before the dependencies would have to be installed in the user's (isolated) environment of choice first. After that the following steps can be executed:
146
+
Both `docker` and `pip install` options above are wrappers around the `cmake`
147
+
build of multipy's runtime. For development purposes it's often helpful to
148
+
invoke `cmake` separately.
132
149
133
-
#### Building
150
+
See the install section for how to correctly setup the Python environment.
0 commit comments