Description
I’m getting this error when trying to convert my ONNX model to TensorRT.
&&&& RUNNING TensorRT.trtexec [TensorRT v100500] [b18] # /usr/src/tensorrt/bin/trtexec --onnx=/workspace/src/data/models/model.onnx --saveEngine=/workspace/src/data/models/model.engine
[11/19/2024-18:35:52] [I] === Model Options ===
[11/19/2024-18:35:52] [I] Format: ONNX
[11/19/2024-18:35:52] [I] Model: /workspace/src/data/models/model.onnx
[11/19/2024-18:35:52] [I] Output:
[11/19/2024-18:35:52] [I] === Build Options ===
[11/19/2024-18:35:52] [I] Memory Pools: workspace: default, dlaSRAM: default, dlaLocalDRAM: default, dlaGlobalDRAM: default, tacticSharedMem: default
[11/19/2024-18:35:52] [I] avgTiming: 8
[11/19/2024-18:35:52] [I] Precision: FP32
[11/19/2024-18:35:52] [I] LayerPrecisions:
[11/19/2024-18:35:52] [I] Layer Device Types:
[11/19/2024-18:35:52] [I] Calibration:
[11/19/2024-18:35:52] [I] Refit: Disabled
[11/19/2024-18:35:52] [I] Strip weights: Disabled
[11/19/2024-18:35:52] [I] Version Compatible: Disabled
[11/19/2024-18:35:52] [I] ONNX Plugin InstanceNorm: Disabled
[11/19/2024-18:35:52] [I] TensorRT runtime: full
[11/19/2024-18:35:52] [I] Lean DLL Path:
[11/19/2024-18:35:52] [I] Tempfile Controls: { in_memory: allow, temporary: allow }
[11/19/2024-18:35:52] [I] Exclude Lean Runtime: Disabled
[11/19/2024-18:35:52] [I] Sparsity: Disabled
[11/19/2024-18:35:52] [I] Safe mode: Disabled
[11/19/2024-18:35:52] [I] Build DLA standalone loadable: Disabled
[11/19/2024-18:35:52] [I] Allow GPU fallback for DLA: Disabled
[11/19/2024-18:35:52] [I] DirectIO mode: Disabled
[11/19/2024-18:35:52] [I] Restricted mode: Disabled
[11/19/2024-18:35:52] [I] Skip inference: Disabled
[11/19/2024-18:35:52] [I] Save engine: /workspace/src/data/models/model.engine
[11/19/2024-18:35:52] [I] Load engine:
[11/19/2024-18:35:52] [I] Profiling verbosity: 0
[11/19/2024-18:35:52] [I] Tactic sources: Using default tactic sources
[11/19/2024-18:35:52] [I] timingCacheMode: local
[11/19/2024-18:35:52] [I] timingCacheFile:
[11/19/2024-18:35:52] [I] Enable Compilation Cache: Enabled
[11/19/2024-18:35:52] [I] errorOnTimingCacheMiss: Disabled
[11/19/2024-18:35:52] [I] Preview Features: Use default preview flags.
[11/19/2024-18:35:52] [I] MaxAuxStreams: -1
[11/19/2024-18:35:52] [I] BuilderOptimizationLevel: -1
[11/19/2024-18:35:52] [I] MaxTactics: -1
[11/19/2024-18:35:52] [I] Calibration Profile Index: 0
[11/19/2024-18:35:52] [I] Weight Streaming: Disabled
[11/19/2024-18:35:52] [I] Runtime Platform: Same As Build
[11/19/2024-18:35:52] [I] Debug Tensors:
[11/19/2024-18:35:52] [I] Input(s)s format: fp32:CHW
[11/19/2024-18:35:52] [I] Output(s)s format: fp32:CHW
[11/19/2024-18:35:52] [I] Input build shapes: model
[11/19/2024-18:35:52] [I] Input calibration shapes: model
[11/19/2024-18:35:52] [I] === System Options ===
[11/19/2024-18:35:52] [I] Device: 0
[11/19/2024-18:35:52] [I] DLACore:
[11/19/2024-18:35:52] [I] Plugins:
[11/19/2024-18:35:52] [I] setPluginsToSerialize:
[11/19/2024-18:35:52] [I] dynamicPlugins:
[11/19/2024-18:35:52] [I] ignoreParsedPluginLibs: 0
[11/19/2024-18:35:52] [I]
[11/19/2024-18:35:52] [I] === Inference Options ===
[11/19/2024-18:35:52] [I] Batch: Explicit
[11/19/2024-18:35:52] [I] Input inference shapes: model
[11/19/2024-18:35:52] [I] Iterations: 10
[11/19/2024-18:35:52] [I] Duration: 3s (+ 200ms warm up)
[11/19/2024-18:35:52] [I] Sleep time: 0ms
[11/19/2024-18:35:52] [I] Idle time: 0ms
[11/19/2024-18:35:52] [I] Inference Streams: 1
[11/19/2024-18:35:52] [I] ExposeDMA: Disabled
[11/19/2024-18:35:52] [I] Data transfers: Enabled
[11/19/2024-18:35:52] [I] Spin-wait: Disabled
[11/19/2024-18:35:52] [I] Multithreading: Disabled
[11/19/2024-18:35:52] [I] CUDA Graph: Disabled
[11/19/2024-18:35:52] [I] Separate profiling: Disabled
[11/19/2024-18:35:52] [I] Time Deserialize: Disabled
[11/19/2024-18:35:52] [I] Time Refit: Disabled
[11/19/2024-18:35:52] [I] NVTX verbosity: 0
[11/19/2024-18:35:52] [I] Persistent Cache Ratio: 0
[11/19/2024-18:35:52] [I] Optimization Profile Index: 0
[11/19/2024-18:35:52] [I] Weight Streaming Budget: 100.000000%
[11/19/2024-18:35:52] [I] Inputs:
[11/19/2024-18:35:52] [I] Debug Tensor Save Destinations:
[11/19/2024-18:35:52] [I] === Reporting Options ===
[11/19/2024-18:35:52] [I] Verbose: Disabled
[11/19/2024-18:35:52] [I] Averages: 10 inferences
[11/19/2024-18:35:52] [I] Percentiles: 90,95,99
[11/19/2024-18:35:52] [I] Dump refittable layers:Disabled
[11/19/2024-18:35:52] [I] Dump output: Disabled
[11/19/2024-18:35:52] [I] Profile: Disabled
[11/19/2024-18:35:52] [I] Export timing to JSON file:
[11/19/2024-18:35:52] [I] Export output to JSON file:
[11/19/2024-18:35:52] [I] Export profile to JSON file:
[11/19/2024-18:35:52] [I]
[11/19/2024-18:35:52] [I] === Device Information ===
[11/19/2024-18:35:52] [I] Available Devices:
[11/19/2024-18:35:52] [I] Device 0: "NVIDIA RTX A2000 Laptop GPU" UUID: GPU-e0e0e811-e2f9-ea34-1d01-b2a35728e2f5
[11/19/2024-18:35:52] [I] Selected Device: NVIDIA RTX A2000 Laptop GPU
[11/19/2024-18:35:52] [I] Selected Device ID: 0
[11/19/2024-18:35:52] [I] Selected Device UUID: GPU-e0e0e811-e2f9-ea34-1d01-b2a35728e2f5
[11/19/2024-18:35:52] [I] Compute Capability: 8.6
[11/19/2024-18:35:52] [I] SMs: 20
[11/19/2024-18:35:52] [I] Device Global Memory: 3795 MiB
[11/19/2024-18:35:52] [I] Shared Memory per SM: 100 KiB
[11/19/2024-18:35:52] [I] Memory Bus Width: 128 bits (ECC disabled)
[11/19/2024-18:35:52] [I] Application Compute Clock Rate: 1.207 GHz
[11/19/2024-18:35:52] [I] Application Memory Clock Rate: 5.501 GHz
[11/19/2024-18:35:52] [I]
[11/19/2024-18:35:52] [I] Note: The application clock rates do not reflect the actual clock rates that the GPU is currently running at.
[11/19/2024-18:35:52] [I]
[11/19/2024-18:35:52] [I] TensorRT version: 10.5.0
[11/19/2024-18:35:52] [I] Loading standard plugins
[11/19/2024-18:35:52] [I] [TRT] [MemUsageChange] Init CUDA: CPU +1, GPU +0, now: CPU 20, GPU 167 (MiB)
[11/19/2024-18:35:54] [I] [TRT] [MemUsageChange] Init builder kernel library: CPU +2132, GPU +396, now: CPU 2308, GPU 563 (MiB)
[11/19/2024-18:35:54] [I] Start parsing network model.
[11/19/2024-18:35:54] [I] [TRT] ----------------------------------------------------------------
[11/19/2024-18:35:54] [I] [TRT] Input filename: /workspace/src/data/models/model.onnx
[11/19/2024-18:35:54] [I] [TRT] ONNX IR version: 0.0.8
[11/19/2024-18:35:54] [I] [TRT] Opset version: 15
[11/19/2024-18:35:54] [I] [TRT] Producer name: tf2onnx
[11/19/2024-18:35:54] [I] [TRT] Producer version: 1.16.1 15c810
[11/19/2024-18:35:54] [I] [TRT] Domain:
[11/19/2024-18:35:54] [I] [TRT] Model version: 0
[11/19/2024-18:35:54] [I] [TRT] Doc string:
[11/19/2024-18:35:54] [I] [TRT] ----------------------------------------------------------------
[11/19/2024-18:35:54] [I] Finished parsing network model. Parse time: 0.0212477
[11/19/2024-18:35:54] [W] Dynamic dimensions required for input: input_1, but no shapes were provided. Automatically overriding shape to: 1x112x112x3
[11/19/2024-18:35:54] [I] Set shape of input tensor input_1 for optimization profile 0 to: MIN=1x112x112x3 OPT=1x112x112x3 MAX=1x112x112x3
[11/19/2024-18:35:54] [E] Error[2]: [graphOptimizer.cpp::fusePattern::3161] Error Code 2: Internal Error (Assertion !never(dim == ShapeContext::one()) || !never(dim == squeezeSuccessorsOutputDims[i]) failed. )
[11/19/2024-18:35:54] [E] Engine could not be created from network
[11/19/2024-18:35:54] [E] Building engine failed
[11/19/2024-18:35:54] [E] Failed to create engine from model or file.
[11/19/2024-18:35:54] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v100500] [b18] # /usr/src/tensorrt/bin/trtexec --onnx=/workspace/src/data/models/model.onnx --saveEngine=/workspace/src/data/models/model.engine
Here is my model:
ONNX
Please help to check it. Thank you so much!