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
174 stars 35 forks source link

update pybind to 2.10.2 #304

Open PaliC opened 1 year ago

PaliC commented 1 year ago

Updated to unblock https://github.com/pytorch/pytorch/pull/91248#issuecomment-1402327940 and the refcount debug utils will be useful :)

facebook-github-bot commented 1 year ago

@PaliC has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Skylion007 commented 1 year ago

I opened a new PR to try v2.10.3 which is almost identical but turns the refcount debug utils off by default (until pybind111 2.11) and has some misc fixes.

Skylion007 commented 1 year ago

Hmm so it looks like there is some GIL issues. One common failure case we saw from this is trying store a python object as a global static variable (as the ctor would be called before the interpreter is initialized).

PaliC commented 1 year ago

Gotcha, will enable testing for #305

I'll take a look to see if there's any global static py::objects

Skylion007 commented 1 year ago

Hmm, are there atexit hooks in this codebase? I think there is an open issue with those that needs to be fixed.