apeforest commented on a change in pull request #15285: Graph dumper
URL: https://github.com/apache/incubator-mxnet/pull/15285#discussion_r314895584
 
 

 ##########
 File path: include/mxnet/imperative.h
 ##########
 @@ -160,8 +160,8 @@ class Imperative {
 
  private:
   friend class NDArray;
-  /*! \brief make constructor protected. */
-  Imperative() {
+  Imperative() :
+    backward_graph_dump_enabled_(dmlc::GetEnv("MXNET_BACKWARD_GRAPH_DUMP", 
false)) {
 
 Review comment:
   If this is only used for debugging, I am not sure if adding a field to a 
production class is a good idea. Can we just pull the environment variable 
instead? It's not impacting production performance and not going to be used in 
multithreaded environment. 

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