pytorch / multipy

torch::deploy (multipy for non-torch uses) is a system that lets you get around the GIL problem by running multiple Python interpreters in a single C++ process.
Other
173 stars 35 forks source link

Back out "Convert multipy embedded library exceptions to specific exception type" #320

Closed 842974287 closed 1 year ago

842974287 commented 1 year ago

Summary: Original commit changeset: 9cb3d1f17f54

Original Phabricator Diff: D44477860

In deploy, we do dlopen to link the .so each time when we create interpreter. So when interpreter manager is out of scope, we dlclose so we no longer have any symbols in the interpreter .so lib https://fburl.com/code/wlcp3r9o.

If we throw a custom exception class that defined in interpreter .so, then in the catch block, if interpreter manager goes out of scope, we don't recognize this exception class anymore and lead to a crash.

Differential Revision: D45629261

facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D45629261

facebook-github-bot commented 1 year ago

This pull request has been merged in pytorch/multipy@d60f34ad38c371e441fe7ffdb77a3c3dda5a5d19.