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/14 23:56:16 UTC
[GitHub] [incubator-mxnet] leleamol commented on issue #12159: C++ api
executor->Forward(false) is much slower than MXPredForward?
leleamol commented on issue #12159: C++ api executor->Forward(false) is much slower than MXPredForward?
URL: https://github.com/apache/incubator-mxnet/issues/12159#issuecomment-473108997
Hi @xiaojingxie
The Executor->Forward() method performs more tasks as compared to MXPredForward(). It invokes following 2 C APIs internally
MXExecutorForward()
and
MXExecutorOutputs()
where as MXPredForward() only runs the forward pass and does not retrieve the outputs.
In addition, the outputs of the forward pass are copied to the 'output' array in the Executor object, for faster retrieval later.
Therefore, we can not compare MXPredForward() with Executor->Forward(). For the correct comparison, we should find out the time required to invoke MXPredGetOutputShape() and MXPredGetOutput() after invoking the MXPredForward()
I hope this answers the question.
@mxnet-label-bot add [Pending Requester Info]
----------------------------------------------------------------
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