Greetings, everyone.
Here is an onnx file: https://github.com/ibaiGorordo/ONNX-SAM2-Segment-Anything/releases/download/0.2.0/decoder.onnx
I am trying to use TensorRT to build convert this file using this cli:
trtexec --onnx=decoder.onnx --saveEngine=decoder.engine
hardware information output by TensorRT :
[04/20/2025-17:31:16] [I] === Device Information ===
[04/20/2025-17:31:16] [I] Available Devices:
[04/20/2025-17:31:16] [I] Device 0: “Orin” UUID: GPU-a00bb704-da56-555b-a79c-65a4e3662de8
[04/20/2025-17:31:16] [I] Selected Device: Orin
[04/20/2025-17:31:16] [I] Selected Device ID: 0
[04/20/2025-17:31:16] [I] Selected Device UUID: GPU-a00bb704-da56-555b-a79c-65a4e3662de8
[04/20/2025-17:31:16] [I] Compute Capability: 8.7
[04/20/2025-17:31:16] [I] SMs: 16
[04/20/2025-17:31:16] [I] Device Global Memory: 62840 MiB
[04/20/2025-17:31:16] [I] Shared Memory per SM: 164 KiB
[04/20/2025-17:31:16] [I] Memory Bus Width: 256 bits (ECC disabled)
[04/20/2025-17:31:16] [I] Application Compute Clock Rate: 1.3 GHz
[04/20/2025-17:31:16] [I] Application Memory Clock Rate: 1.3 GHz
TensorRT version is shown here[The cuda version is 12.6]:
[04/20/2025-17:31:16] [I] Note: The application clock rates do not reflect the actual clock rates that the GPU is currently running at.
[04/20/2025-17:31:16] [I] TensorRT version: 10.7.0
[04/20/2025-17:31:16] [I] Loading standard plugins
[04/20/2025-17:31:16] [I] [TRT] [MemUsageChange] Init CUDA: CPU +2, GPU +0, now: CPU 31, GPU 13403 (MiB)
[04/20/2025-17:31:18] [I] [TRT] [MemUsageChange] Init builder kernel library: CPU +928, GPU +749, now: CPU 1002, GPU 14197 (MiB)
[04/20/2025-17:31:18] [I] Start parsing network model.
[04/20/2025-17:31:18] [I] [TRT] ----------------------------------------------------------------
[04/20/2025-17:31:18] [I] [TRT] Input filename: /home/nvidia/projects/segment-anything-2/decoder.onnx
[04/20/2025-17:31:18] [I] [TRT] ONNX IR version: 0.0.8
[04/20/2025-17:31:18] [I] [TRT] Opset version: 16
[04/20/2025-17:31:18] [I] [TRT] Producer name: pytorch
[04/20/2025-17:31:18] [I] [TRT] Producer version: 2.6.0
[04/20/2025-17:31:18] [I] [TRT] Domain:
[04/20/2025-17:31:18] [I] [TRT] Model version: 0
[04/20/2025-17:31:18] [I] [TRT] Doc string:
[04/20/2025-17:31:18] [I] [TRT] ----------------------------------------------------------------
[04/20/2025-17:31:18] [E] Error[4]: ITensor::getDimensions: Error Code 4: Internal Error (/OneHot: an IIOneHotLayer cannot be used to compute a shape tensor)
[04/20/2025-17:31:18] [E] [TRT] ModelImporter.cpp:948: While parsing node number 146 [Tile → “/Tile_output_0”]:
[04/20/2025-17:31:18] [E] [TRT] ModelImporter.cpp:950: — Begin node —
input: “/Unsqueeze_11_output_0”
input: “/Reshape_4_output_0”
output: “/Tile_output_0”
name: “/Tile”
op_type: “Tile”
[04/20/2025-17:31:18] [E] [TRT] ModelImporter.cpp:951: — End node —
[04/20/2025-17:31:18] [E] [TRT] ModelImporter.cpp:953: ERROR: ModelImporter.cpp:195 In function parseNode:
[6] Invalid Node - /Tile
ITensor::getDimensions: Error Code 4: Internal Error (/OneHot: an IIOneHotLayer cannot be used to compute a shape tensor)
[04/20/2025-17:31:18] [E] Failed to parse onnx file
[04/20/2025-17:31:18] [I] Finished parsing network model. Parse time: 0.037032
[04/20/2025-17:31:18] [E] Parsing model failed
[04/20/2025-17:31:18] [E] Failed to create engine from model or file.
[04/20/2025-17:31:18] [E] Engine set up failed
Is anyone willing to share any idea about this?
Thank you, kind community. :)