apeforest commented on a change in pull request #15210: Custom Operator Profiling Enhancement URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r295531841
########## File path: src/engine/naive_engine.cc ########## @@ -159,16 +160,21 @@ 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); + // GenerateDisplayName() will return a pointer to the correct name of the operator + const char* display_name = profiling ? + profiler::CustomOpProfiler::Get()->GenerateDisplayName(opr_name) Review comment: nit: indent ---------------------------------------------------------------- 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