cjolivier01 commented on issue #9545: Profiling discussion
URL: 
https://github.com/apache/incubator-mxnet/issues/9545#issuecomment-360680487
 
 
   Question:
   
   _"Operator tuning: I saw you have contributed to the operator tuning of 
mxnet. Seems it will create many omp threads before executing graph. How does 
this function affect the performance of mxnet? If I have set cpu affinity in my 
environment, these omp threads will be binded to each core. Then when executing 
computation graph, many other omp threads will be created and binded again. Do 
you think that will impact the performance?"_
   
   @cjolivier01:
   
   So yes, the graph executor itself will be a couple of threads that execute 
the operators which tend to, in turn, fork into many OMP threads for some parts 
of the operation (in some cases).  Operator tuning actually supresses this for 
some cases where the overhead of forking and converging the OMP threads takes 
longer than it would have taken to just do the whole operation on a single 
core.  This is much more pronounced on non-Intel-OMP libraries (ie libgomp).
   
   But anyway, your question is about does the execution thread binded to a 
core cause the binded OMP thread to be slower due to caching concerns?  I'd 
answer "maybe, but without data to the contrary, I assume that since the 
execution thread tends to be stalled while the operator is running its omp 
threads, that it's worse to reserve a whole core that will be idle while N-1 
OMP threads run".
   
   ^^ this assumes multiple operators are not running in parallel, which is a 
whole other discussion as it relates to core binding.
   
   I am by no means steadfast in this opinion, but it is an assumption at this 
point.  Have you known this to be the case with other frameworks or experiments?
   
   
   
   

----------------------------------------------------------------
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