SSDMobilenetV1 kDEVICE_TO_SHAPE_HOST failed when TensorRT trying to fuse Unsqueeze with NonMaxSuppression node
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Description
I tried to convert SSDMobilenetV1 model from ONNX to FP32 TensorRT engine using trtexec (TensorRT v10.4) in Jetson AGX Orin (64 GB). But it fails with the following error message.
Device to shape host node should not be folded into myelin when TensorRT tries to fuse Unsqueeze and NMS node. And it does not throw error for all such fusions. From the log, we can see that certain Unsqueeze NMS fusions are successful but the reported fusion nodes cause engine creation failure.
Environment
TensorRT Version: 10.4
NVIDIA GPU: Jetson AGX Orin (nvgpu)
NVIDIA Driver Version: 540.4.0
CUDA Version: 12.6.68
CUDNN Version: 9.3.0.75
Operating System: Linux aarch64 - Ubuntu 22.04 (Jetpack 6.1)
Python Version: 3.10.12
Tensorflow Version: 2.20.0
tf2onnx Version: 1.16.1
Onnx Version: 1.18.0
Onnxruntime Version: 1.20.0
Relevant Files and Steps to reproduce
Source onnx model path: https://zenodo.org/record/4735652/files/ssd_mobilenet_v1_coco_2018_01_28.onnx
Input tensor format: NHWC
Verified that this ONNX model runs successfully with ONNXRUNTIME using polygraphy run <model.onnx> --onnxrt command.
Trtexec command used:
/usr/src/tensorrt/bin/trtexec --onnx=ssd_mobilenet_v1_coco_2018_01_28.onnx --saveEngine=mbnet.engine --verbose --inputIOFormats=fp32:hwc --outputIOFormats=fp32:hwc --minShapes=image_tensor:0:1x300x300x3 --optShapes=image_tensor:0:4x300x300x3 --maxShapes=image_tensor:0:8x300x300x3
Attached the output log for your reference. Could you please suggest possible solutions to resolve this issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied ONNX model and trtexec command, then inspect ssd_mbnetv1.log around the reported Unsqueeze/NMS fusion and kDEVICE_TO_SHAPE_HOST failure. Reproduce on the listed TensorRT 10.4 Jetson AGX Orin environment and compare successful and failing fusions; done means identifying a reproducible cause or supported resolution for engine creation.
Written by the indexing model from the issue text.
Assessment
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100