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 re-create 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 linux and mac 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 at all.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services