Zha0q1 commented on a change in pull request #15210: [WIP] Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r292769349
 
 

 ##########
 File path: src/engine/threaded_engine.cc
 ##########
 @@ -333,9 +333,11 @@ void ThreadedEngine::PushAsync(AsyncFn fn, Context 
exec_ctx,
         << device_count_;
   }
 #endif
-  ThreadedOpr *opr = NewOperator(std::move(fn), const_vars, mutable_vars, 
prop, opr_name, wait);
-  opr->temporary = true;
   const bool profiling = 
profiler_->IsProfiling(profiler::Profiler::kImperative);
+       const char* d_name = profiling ? 
profiler::CustomOpProfiler::Get()->GetDisplayName(opr_name) : NULL;
+       const char* display_name = d_name ? d_name : opr_name;
 
 Review comment:
   The Idea is GetDisplayName() will store the display name in the singleton 
object, and return a char* to that data. I need to change the function name to 
something like "AssignDisplayName" though to avoid confusion

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


With regards,
Apache Git Services

Reply via email to