You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/03/17 02:58:51 UTC

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

arcadiaphy edited a comment 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 sure all locking primitives are in valid states and restart the threads in child process. The easiest way is to restart CustomOperator when fork happens just like Engine does.
   2. There is no fork on windows, so python use spawn method to create new process. I have no windows machine so I can only test on unix with:`import multiprocessing as mp; mp.set_start_method('spawn')` It seems like python re-import mxnet in child process when spawning, so the bug doesn't exist even without the fix.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services