Failed to build engine.py on the Jetson TX2 jetpack 4.4

Failed to build engine.py on the Jetson TX2 jetpack 4.4

Input filename: workspace/best.trand.sim.onnx
ONNX IR version: 0.0.8
Opset version: 17
Producer name: pytorch
Producer version: 2.0.1
Domain:
Model version: 0
Doc string:
[08/09/2023-22:10:46] [E] [TRT] /model.22/dfl/Reshape: volume mismatch. Input dimensions [1,33,8400] have volume 277200 and output dimensions [1,4,16,8400] have volume 537600.
ERROR: onnx2trt_utils.cpp:188 In function convertAxis:
[8] Assertion failed: axis >= 0 && axis < nbDims
[08/09/2023-22:10:46] [E] Failed to parse onnx file
[08/09/2023-22:10:46] [E] Parsing model failed
[08/09/2023-22:10:46] [E] Engine creation failed
[08/09/2023-22:10:46] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec # trtexec --onnx=workspace/best.trand.sim.onnx --saveEngine=workspace/best.trand.sim.engine

CUDA: 10.2.89
TensorRT: 7.1.3.0
cuDNN: 8.0.0.180

Hi,

This looks like a Jetson issue. Please refer to the below samples in case useful.

For any further assistance, we will move this post to to Jetson related forum.

Thanks!

Hi,
Could you run the ONNX model with your machine?I am wondering if it is a JetPack version problem, because I have found that other people have similar problems to me. Once he switches to the new version, he can run. My JetPack version is indeed quite old. It is JetPack 4.4
I want to test whether it is a version problem or a model problem,please!

best.trand.sim.onnx (42.6 MB)

Hi,

Yes, please upgrade to JetPack 4.6.3.
We test your model with 4.6.3 on TX2 and it can work.

$ /usr/src/tensorrt/bin/trtexec --onnx=best.trand.sim.onnx
&&&& RUNNING TensorRT.trtexec [TensorRT v8201] # /usr/src/tensorrt/bin/trtexec --onnx=best.trand.sim.onnx
...
[08/11/2023-03:48:36] [I] Using random values for input images
[08/11/2023-03:48:36] [I] Created input binding for images with dimensions 1x3x640x640
[08/11/2023-03:48:36] [I] Using random values for output output0
[08/11/2023-03:48:36] [I] Created output binding for output0 with dimensions 1x8400x7
[08/11/2023-03:48:36] [I] Starting inference
[08/11/2023-03:48:39] [I] Warmup completed 3 queries over 200 ms
[08/11/2023-03:48:39] [I] Timing trace has 44 queries over 3.14131 s
[08/11/2023-03:48:39] [I]
[08/11/2023-03:48:39] [I] === Trace details ===
[08/11/2023-03:48:39] [I] Trace averages of 10 runs:
[08/11/2023-03:48:39] [I] Average on 10 runs - GPU latency: 71.0918 ms - Host latency: 71.3825 ms (end to end 71.3912 ms, enqueue 13.3939 ms)
[08/11/2023-03:48:39] [I] Average on 10 runs - GPU latency: 71.067 ms - Host latency: 71.3581 ms (end to end 71.3665 ms, enqueue 13.4465 ms)
[08/11/2023-03:48:39] [I] Average on 10 runs - GPU latency: 71.1671 ms - Host latency: 71.4587 ms (end to end 71.467 ms, enqueue 13.6196 ms)
[08/11/2023-03:48:39] [I] Average on 10 runs - GPU latency: 71.0849 ms - Host latency: 71.3762 ms (end to end 71.3848 ms, enqueue 13.6609 ms)
[08/11/2023-03:48:39] [I]
[08/11/2023-03:48:39] [I] === Performance summary ===
[08/11/2023-03:48:39] [I] Throughput: 14.0069 qps
[08/11/2023-03:48:39] [I] Latency: min = 70.3208 ms, max = 72.5144 ms, mean = 71.3843 ms, median = 71.3651 ms, percentile(99%) = 72.5144 ms
[08/11/2023-03:48:39] [I] End-to-End Host Latency: min = 70.3303 ms, max = 72.5232 ms, mean = 71.3928 ms, median = 71.3732 ms, percentile(99%) = 72.5232 ms
[08/11/2023-03:48:39] [I] Enqueue Time: min = 11.9727 ms, max = 15.002 ms, mean = 13.5774 ms, median = 13.5859 ms, percentile(99%) = 15.002 ms
[08/11/2023-03:48:39] [I] H2D Latency: min = 0.274048 ms, max = 0.281982 ms, mean = 0.278146 ms, median = 0.278503 ms, percentile(99%) = 0.281982 ms
[08/11/2023-03:48:39] [I] GPU Compute Time: min = 70.0329 ms, max = 72.223 ms, mean = 71.0932 ms, median = 71.0739 ms, percentile(99%) = 72.223 ms
[08/11/2023-03:48:39] [I] D2H Latency: min = 0.0114746 ms, max = 0.013916 ms, mean = 0.0130123 ms, median = 0.0131226 ms, percentile(99%) = 0.013916 ms
[08/11/2023-03:48:39] [I] Total Host Walltime: 3.14131 s
[08/11/2023-03:48:39] [I] Total GPU Compute Time: 3.1281 s
[08/11/2023-03:48:39] [I] Explanations of the performance metrics are printed in the verbose logs.
[08/11/2023-03:48:39] [I]
&&&& PASSED TensorRT.trtexec [TensorRT v8201] # /usr/src/tensorrt/bin/trtexec --onnx=best.trand.sim.onnx

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.