JohnLee168 commented on issue #14260: c/c++ multiple threads inference problem
URL: 
https://github.com/apache/incubator-mxnet/issues/14260#issuecomment-468122798
 
 
   > @JohnLee168 based on my understanding and documentation the 
MXPredCreateMultiThread() can be used only when the EngineType is NaiveEngine.
   > 
   > It is possible to reuse PredictorHandle created by MXPredCreate() in a 
single threaded environment by calling MXPredForward().
   > In case of multi-threaded environment, if you want to reuse 
PredictorHandle, you would have to keep the operations MXPredSetInput(), 
MXPredForward() and MXPredGetOutput() in the critical region protected by 
exclusive lock.
   > 
   > Since this is a question, please submit them on MXNet discussion forum 
(https://discuss.mxnet.io), where it will get a wider audience and allow other 
to learn as well.
   > I would propose to close this issue now in favor of the discussion forum 
issue you will file, please feel free to re-open if closed in error.
   > Thanks!"
   > 
   > @mxnet-label-bot add [Question, C API, Thread Safety]
   
   Thanks for your reply.
   So, you mean either I use one thread to inference, or use multiple threads 
which 
   MXPredSetInput(), MXPredForward() and MXPredGetOutput() shoudle be 
locked(MXPredSetInput(), MXPredForward() and MXPredGetOutput() functions can 
only be running in one thread at a time), Is that right?
   I created a new topic on forum. And i'll close this issue. Thanks for your 
help.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to