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

 ##########
 File path: src/engine/naive_engine.cc
 ##########
 @@ -159,7 +160,11 @@ class NaiveEngine final : public Engine {
     this->req_completed_ = false;
     profiler::Profiler *profiler = profiler::Profiler::Get();
     NaiveOpr *opr = nullptr;
+    // Try to get a new name. Only not null for sub-operators of a custom 
operator
     const bool profiling = opr_name && 
profiler->IsProfiling(profiler::Profiler::kImperative);
+    const char* d_name = profiling && opr_name ?
+                         
profiler::CustomOpProfiler::Get()->GenerateDisplayName(opr_name) : nullptr;
+    const char* display_name = (d_name ? d_name : opr_name);
     if (profiling) {
       opr = NewOperator(exec_fun, const_vars, mutable_vars,
 
 Review comment:
   Who frees this ptr?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to