mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/55850 ghstack-source-id: 126339587 Test Plan: diff on top builds successfully on Sandcastle Reviewed By: wconstab Differential Revision: D27722254 fbshipit-source-id: 181ae1a874dbfc73688dcc5b7e9264d79abd44d3
Torch Deploy
This is an experimental feature to embed multiple python interpreters inside the torch library, providing a solution to the 'GIL problem' for multithreading with the convenience of python and eager or torchscripted pytorch programs.
libinterpreter
This is an internal library used behind the scenes to enable multiple python interpreters in a single deploy runtime. libinterpreter.so is DLOPENed multiple times by the deploy library. Each copy of libinterpreter exposes a simple interpreter interface but hides its python and other internal symbols, preventing the different python instances from seeing each other.