Use GIL to guard decref of jit::toPyObj return value in processRpc#38376
Use GIL to guard decref of jit::toPyObj return value in processRpc#38376mrshenli wants to merge 7 commits intogh/mrshenli/175/basefrom
Conversation
[ghstack-poisoned]
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
|
This PR is for MessageType::PYTHON_RREF_FETCH_CALL. There are more sites, right? UPDATE: All known sites are resolved? |
| namespace { | ||
|
|
||
| py::object toPyObj(IValue value) { | ||
| SerializedPyObj toSerializedPyObj(IValue value) { |
There was a problem hiding this comment.
It's only used by MessageType::PYTHON_RREF_FETCH_CALL.
Can we move under case MessageType::PYTHON_RREF_FETCH_CALL and make it a named lambda, like the auto markComplete = [...](...){...}; lambda on line 116.
There was a problem hiding this comment.
Sure, edited, but the downside is that we will need to capture this lambda in two nested callbacks. I am not sure if the extra overhead worth it here.
There was a problem hiding this comment.
Should be fine.
If there is no capture by value, the closure type is typically trivially copyable and trivially moveable.
http://www.cplusplus.com/forum/general/202662/
💊 CI failures summary and remediationsAs of commit fbb7f05 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker. This comment has been revised 14 times. |
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
…ocessRpc" Differential Revision: [D21540179](https://our.internmc.facebook.com/intern/diff/D21540179) [ghstack-poisoned]
…ytorch#38376) Summary: Pull Request resolved: pytorch#38376 Test Plan: Imported from OSS Differential Revision: D21540179 Pulled By: mrshenli fbshipit-source-id: 082fa5f11da7fc1f083710b498e72abc5ba2c244
Stack from ghstack:
Differential Revision: D21540179