Zha0q1 edited a comment on issue #20296:
URL: 
https://github.com/apache/incubator-mxnet/issues/20296#issuecomment-846326358


   ok i found the original design discussion [here 
](https://github.com/apache/incubator-mxnet/pull/12456/files#r218632768)
   
   > The fundamental problem here is that if we create multiple executors in 
the same thread (e.g., in the main thread), these executors will share the same 
temporary resources, which leads to race condition when these executors are 
used in different threads. To fix this problem, here we avoid creating 
executors when we create predictors in the main thread. The executors are 
actually created when the predictor is used in the worker thread for the first 
time. As long as the executor is always used in this worker thread, there won't 
be race condition.
   by zheng-da
   
   So i guess a better approach is to lock 
https://github.com/apache/incubator-mxnet/blob/v1.x/src/c_api/c_predict_api.cc#L75


-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to