You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/09/11 22:43:19 UTC

[GitHub] piiswrong commented on a change in pull request #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used

piiswrong commented on a change in pull request #7854: Basic CPU Kernel OMP selection based upon whether GPU has been used
URL: https://github.com/apache/incubator-mxnet/pull/7854#discussion_r138211690
 
 

 ##########
 File path: src/engine/threaded_engine.h
 ##########
 @@ -311,6 +312,12 @@ class ThreadedEngine : public Engine {
    */
   void ExecuteOprBlock(RunContext run_ctx, OprBlock *opr_block) {
     ThreadedOpr* threaded_opr = opr_block->opr;
+#if MXNET_USE_CUDA
+    if(run_ctx.ctx.dev_mask() == gpu::kDevMask) {
+      // Signify to kernel that GPU is being used
+      mxnet::op::mxnet_op::KernelState::SetUsingGPU(true);
 
 Review comment:
   this should be put in lazy alloc queue
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services