KellenSunderland commented on a change in pull request #14040: Reformat of 
TensorRT to use subgraph API
URL: https://github.com/apache/incubator-mxnet/pull/14040#discussion_r253288287
 
 

 ##########
 File path: src/operator/subgraph/tensorrt/onnx_to_tensorrt.cc
 ##########
 @@ -127,16 +128,15 @@ nvinfer1::ICudaEngine* onnxToTrtCtx(
       }
       throw dmlc::Error("Cannot parse ONNX into TensorRT Engine");
   }
-
-  bool fp16 = trt_builder->platformHasFastFp16();
-
+  if (dmlc::GetEnv("MXNET_TENSORRT_USE_FP16", true)) {
+    if (trt_builder->platformHasFastFp16()) {
+      trt_builder->setFp16Mode(true);
+    } else {
+      LOG(INFO) << "WARNING: TensorRT can't use fp16 on this plateform";
 
 Review comment:
   Also we're logging INFO level logs but have WARNING in the message.  I'd 
remove the warning from the message and set log level to warning.  (this is a 
common issue in our codebase).

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


With regards,
Apache Git Services

Reply via email to