[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-20 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-474737411 @anirudh2290 Everything OK now. This is an automated message from the Apache

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-19 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-474679966 @anirudh2290 Add some docs on custom op. This is an automated message from

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-19 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-474223513 @anirudh2290 If we don't want to depend on libpython, then this partial fix will work fine if you don't try to fork when having unfinished

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-18 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-47410 @YutingZhang I think the problem you mentioned is related to GIL, correctly handling GIL in c++ extension is a tricky problem, easy to cause

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-18 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-474181960 @anirudh2290 The program blocks because of GIL, additional handling should be added to correctly run callbacks. ``` #include

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-18 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-473822735 I write a simple example to show the program freeze, which comes from calling CFUNCTYPE in thread when preparing fork. [fork

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-17 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-473672762 @anirudh2290 No hangs after adding c.wait_to_read(). It only happens in calling CFUNCTYPE when destructing CustomOperator or running pre-fork

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-17 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-473663292 I find another strange bug, the custom operator hangs even without fork. ``` import mxnet as mx class

[GitHub] [incubator-mxnet] arcadiaphy commented on issue #14451: fix custom operation in fork

2019-03-16 Thread GitBox
arcadiaphy commented on issue #14451: fix custom operation in fork URL: https://github.com/apache/incubator-mxnet/pull/14451#issuecomment-473611263 @wkcn For the two questions: 1. Yes, each process has its independent threads. Fork only duplicates the caller thread, so we need to make