NVIDIA / NVIDIA/TensorRT

Error converting ONNX model to TensorRT engine on Jetson with CUDA 11.4 and TensorRT 8.4.6 (polygraphy)

Open
#3,732 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
C++
Stars
13.4k
Forks
2.4k
Avg merge
5d 3h
Merged PRs (30d)
2

Description

Issue Description:

When attempting to convert an ONNX model to a TensorRT engine in a Jetson environment, the following error occurs:

[W] onnx2trt_utils.cpp:363: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
[W] onnx2trt_utils.cpp:391: One or more weights outside the range of INT32 was clamped
[W] IElementWiseLayer with inputs onnx::Add_554 and (Unnamed Layer* 652) [Shuffle]_output: first input has type Int32 but second input has type Float.
[W] IElementWiseLayer with inputs (Unnamed Layer* 654) [ElementWise]_output and (Unnamed Layer* 653) [Shuffle]_output: first input has type Int32 but second input has type Float.
[E] [layers.cpp::validate::2419] Error Code 4: Internal Error ((Unnamed Layer* 654) [ElementWise]: operation MAX has incompatible input types Int32 and Float)
[E] ModelImporter.cpp:748: While parsing node number 444 [Clip -> "onnx::Cast_565"]:
[E] ModelImporter.cpp:749: --- Begin node ---
[E] ModelImporter.cpp:750: input: "onnx::Add_554"
    input: "onnx::Clip_2582"
    input: "onnx::Clip_564"
    output: "onnx::Cast_565"
    name: "Clip_444"
    op_type: "Clip"
[E] ModelImporter.cpp:751: --- End node ---
[E] ModelImporter.cpp:753: ERROR: ModelImporter.cpp:179 In function parseGraph:
    [6] Invalid Node - Clip_444
    [layers.cpp::validate::2419] Error Code 4: Internal Error ((Unnamed Layer* 654) [ElementWise]: operation MAX has incompatible input types Int32 and Float)
[E] In node 444 (parseGraph): INVALID_NODE: Invalid Node - Clip_444
    [layers.cpp::validate::2419] Error Code 4: Internal Error ((Unnamed Layer* 654) [ElementWise]: operation MAX has incompatible input types Int32 and Float)
[!] Could not parse ONNX correctly

Environment Information:

  • Jetson
  • CUDA Version: 11.4.239
  • cuDNN Version: 8.3.2.49
  • TensorRT Version: 8.4.6
  • Jetpack Version: 5.0.1

Steps to Reproduce:

  1. Use the provided environment information and attempt to convert the model to a TensorRT engine.
  2. Encounter the above error message.

Expected Behavior:

Expect successful conversion of the ONNX model to a TensorRT engine without encountering type mismatch errors.

Additional Information:

Provide any additional information or attempted solutions to help better understand and resolve the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the conversion in the stated Jetson, CUDA 11.4, TensorRT 8.4.6, and JetPack 5.0.1 environment. Inspect ONNX node 444, Clip_444, and the reported INT32/Float inputs to identify the model-side or parser-side mismatch. Done means the provided ONNX model converts successfully to a TensorRT engine without the type error.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, machine-learning
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.