I have tried to deploy an ONNX model from PyTorch using TensorRT.
On PC everything was quite good.
On XAVIER NX I couldn’t pass the optimization phase.
I had an exception calling buildEngineWithConfig API: “Assertion Error in mergeDAG: 0 (d2Inputs.size() == n2.inputs.size()) ”
I have also tried to use Onnx2trt tool from TensorRT OSS.
But the same error result.
“ Assertion Error in mergeDAG: 0 (d2Inputs.size() == n2.inputs.size()) ”
(now it used buildCudaEngine API)
What is the root cause for this issue ?
I would be grateful for any help.
Best Regards
Shlomi Peer
Environment 1 - Good
Win10
Visual studio 2019
CUDA Driver Version / Runtime Version - 10.2 / 10.2
CUDNN Version - 8.0.1
TensorRT - 7.2.1.6
GPU 1: NVIDIA Quadro M2000M
Display driver R451.77
TensorRT OSS tool - run onnx2trt on jetson NX
set full name path to onnx attached as param1,
full name path for exported serialized file as param2original_d2net.onnx (29.1 MB)
Since there are some fixes between TensorRT7.1.3(JetPack4.4.1) and TensorRT7.1.0 (JetPack4.4 DP),
Could you reflash your XavierNX with our latest JetPack4.4.1 and try it again?
First i figured out that the error was with operator Sub.
I replaced it with Add (minus) and it worked.
The model was now OK optimized and could run inference also.
Second ,
We had a problem to reflash our NX with JetPack4.4.1 [using last SDKManager]
Also couldn’t reflash TX2i & TX with JetPack4.4.1.
Only with JetPack4.4DP.
1.
Good to know you have a workaround for the operation.
Based on the support matrix of onnx2trt, the SUB operation does support.
Guess the error may occur due to some variance in the layer definition.
2.
Are you using a custom carrier board?
If not, you should be able to reflash the device with a newer JetPack release.
You can file a topic specifying for the flash issue, so we can provide some help for you.
What do you mean some variance in the layer definition ?
such variance is working in Add operator . so i can’t understand.
Can you be more specific ? an example might help.
No it is NVIDIA Carrier-NVIDIA EVB.
**** Also :
We could upgrade to 4.4.1 using Packag Managment tool methods instead of using SDK manager: