mkolod commented on a change in pull request #11325: [MXNET-703] TensorRT 
runtime integration
URL: https://github.com/apache/incubator-mxnet/pull/11325#discussion_r205247123
 
 

 ##########
 File path: src/executor/graph_executor.cc
 ##########
 @@ -1018,20 +1155,37 @@ void GraphExecutor::Init(nnvm::Symbol symbol,
                                 g.GetAttr<StorageTypeVector>("storage_type"));
   }
 
+  if (dmlc::GetEnv("MXNET_USE_TENSORRT", false)) {
 
 Review comment:
   @eric-haibin-lin @KellenSunderland The reason this is not being cached the 
way `log_verbose_` is, is mostly because users can change the value of the env 
var at runtime more than once. An example of such a situation can be found 
[here](https://github.com/mkolod/incubator-mxnet/blob/tensorrt_integration/tests/python/tensorrt/test_tensorrt_lenet5.py#L77::L85)
 in the unit tests. The reason for this being an env var was to not break any 
of the C APIs that are tied to all language frontends. Allowing the check at 
simple_bind time each time allows to run with or without TensorRT, to compare 
performance, for instance. Note that this env var only gets checked twice in 
two different methods during bind time, while `log_verbose_` gets checked 9 
times. Note that once a symbol is bound, the env var no longer gets checked. 
It's not common for a symbol to be rebound, and even when that happens, it's 
just during setup, not anwhere else later on.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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