[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-24 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r296862979
 
 

 ##
 File path: src/profiler/custom_op_profiler.h
 ##
 @@ -0,0 +1,126 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#ifndef MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+#define MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+
+#include 
+#include 
+#include 
+#include 
+#include "./profiler.h"
+
+namespace mxnet {
+namespace profiler {
 
 Review comment:
   i think profile_symbolic should also have this info, otherwise users may 
have a symbolic model with custom op but won't see any info on custom op.


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


[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-21 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r296429863
 
 

 ##
 File path: src/operator/custom/custom-inl.h
 ##
 @@ -143,8 +149,7 @@ class CustomOperator {
 
 ctx.async_on_complete();
   },
-  ctx.run_ctx.ctx, vars, vars2, FnProperty::kNoSkip, 0,
-  "CustomOperator");
+  ctx.run_ctx.ctx, vars, vars2, FnProperty::kNoSkip, 0, "Dummy_Wait");
 
 Review comment:
   Can we change Dummy_Wait -> CustomOperatorWait


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


[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-21 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r296415978
 
 

 ##
 File path: src/profiler/custom_op_profiler.h
 ##
 @@ -0,0 +1,126 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#ifndef MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+#define MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+
+#include 
+#include 
+#include 
+#include 
+#include "./profiler.h"
+
+namespace mxnet {
+namespace profiler {
 
 Review comment:
   okay , what happens for symbolic case ? does it fallback to old custom op 
display for profiling or does it not display anything at all for custom op.


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


[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-21 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r296106932
 
 

 ##
 File path: src/profiler/custom_op_profiler.h
 ##
 @@ -0,0 +1,126 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#ifndef MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+#define MXNET_PROFILER_CUSTOM_OP_PROFILER_H_
+
+#include 
+#include 
+#include 
+#include 
+#include "./profiler.h"
+
+namespace mxnet {
+namespace profiler {
 
 Review comment:
   Custom profiler doesnt respect start and stop for profiling currently. This 
means that irrespective of profiler start stop this will profile. You can take 
a look at device storage profiler for doing similar checks -> mode should be 
kSymbolic | kImperative.


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


[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-18 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r295047266
 
 

 ##
 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:
   the free is  done by DeleteOperator


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


[GitHub] [incubator-mxnet] anirudh2290 commented on a change in pull request #15210: Custom Operator Profiling Enhancement

2019-06-18 Thread GitBox
anirudh2290 commented on a change in pull request #15210: Custom Operator 
Profiling Enhancement
URL: https://github.com/apache/incubator-mxnet/pull/15210#discussion_r295047266
 
 

 ##
 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:
   its done by DeleteOperator


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