KellenSunderland commented on a change in pull request #13310: [MXNET-703] 
Update to TensorRT 5, ONNX IR 3. Fix inference bugs.
URL: https://github.com/apache/incubator-mxnet/pull/13310#discussion_r247690631
 
 

 ##########
 File path: src/operator/contrib/nnvm_to_onnx.cc
 ##########
 @@ -77,9 +83,23 @@ op::TRTParam ConvertNnvmGraphToOnnx(
   }
 
   ModelProto model_proto;
-  // Need to determine IR versions and features to support
-  model_proto.set_ir_version(static_cast<int64>(2));
+
+  // We're currently serializing our models in ONNX 3, opset 8 as it is best 
supported by the
+  // currently linked version of the onnx-tensorrt library.
+  // More information on ONNX versions and opsets can be found at:
+  // https://github.com/onnx/onnx/blob/master/docs/IR.md
+
+  auto opset_proto = model_proto.add_opset_import();
 
 Review comment:
   Yeah I believe so, proto editing in C++ is a little strange but I've seen 
this pattern in several places.  I've run model validation and it certainly 
failed for me right away if I did not have a properly set opset proto 
associated with my model proto for onnx v3 models.

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