Quantcast
Channel: TAO Toolkit - NVIDIA Developer Forums
Viewing all articles
Browse latest Browse all 499

Failed to generate TRT .engine from ONNX model generated using TAO

$
0
0

I converted a .etlt model file to .onnx with Object Detection using TAO DetectNet_v2, but when i am trying to build its tensorrt .engine file on orin nano running:

/usr/src/tensorrt/bin/trtexec --onnx=resnet18_detector.onnx --saveEngine=/home/orin/Documents/resnet_detector.engine --workspace=2048 --verbose

it raised the following error.I was wondering if you could help me to fix it.

[06/18/2024-02:02:08] [I] === Model Options ===
[06/18/2024-02:02:08] [I] Format: ONNX
[06/18/2024-02:02:08] [I] Model: resnet18_detector_fp32.onnx
[06/18/2024-02:02:08] [I] Output:
[06/18/2024-02:02:08] [I] === Build Options ===
[06/18/2024-02:02:08] [I] Max batch: explicit batch
[06/18/2024-02:02:08] [I] Memory Pools: workspace: 2048 MiB, dlaSRAM: default, dlaLocalDRAM: default, dlaGlobalDRAM: default
[06/18/2024-02:02:08] [I] minTiming: 1
[06/18/2024-02:02:08] [I] avgTiming: 8
[06/18/2024-02:02:08] [I] Precision: FP32
[06/18/2024-02:02:08] [I] LayerPrecisions:
[06/18/2024-02:02:08] [I] Calibration:
[06/18/2024-02:02:08] [I] Refit: Disabled
[06/18/2024-02:02:08] [I] Sparsity: Disabled
[06/18/2024-02:02:08] [I] Safe mode: Disabled
[06/18/2024-02:02:08] [I] DirectIO mode: Disabled
[06/18/2024-02:02:08] [I] Restricted mode: Disabled
[06/18/2024-02:02:08] [I] Build only: Disabled
[06/18/2024-02:02:08] [I] Save engine: /home/orin/Documents/resnet_detector.engine
[06/18/2024-02:02:08] [I] Load engine:
[06/18/2024-02:02:08] [I] Profiling verbosity: 0
[06/18/2024-02:02:08] [I] Tactic sources: Using default tactic sources
[06/18/2024-02:02:08] [I] timingCacheMode: local
[06/18/2024-02:02:08] [I] timingCacheFile:
[06/18/2024-02:02:08] [I] Heuristic: Disabled
[06/18/2024-02:02:08] [I] Preview Features: Use default preview flags.
[06/18/2024-02:02:08] [I] Input(s)s format: fp32:CHW
[06/18/2024-02:02:08] [I] Output(s)s format: fp32:CHW
[06/18/2024-02:02:08] [I] Input build shapes: model
[06/18/2024-02:02:08] [I] Input calibration shapes: model
[06/18/2024-02:02:08] [I] === System Options ===
[06/18/2024-02:02:08] [I] Device: 0
[06/18/2024-02:02:08] [I] DLACore:
[06/18/2024-02:02:08] [I] Plugins:
[06/18/2024-02:02:08] [I] === Inference Options ===
[06/18/2024-02:02:08] [I] Batch: Explicit
[06/18/2024-02:02:08] [I] Input inference shapes: model
[06/18/2024-02:02:08] [I] Iterations: 10
[06/18/2024-02:02:08] [I] Duration: 3s (+ 200ms warm up)
[06/18/2024-02:02:08] [I] Sleep time: 0ms
[06/18/2024-02:02:08] [I] Idle time: 0ms
[06/18/2024-02:02:08] [I] Streams: 1
[06/18/2024-02:02:08] [I] ExposeDMA: Disabled
[06/18/2024-02:02:08] [I] Data transfers: Enabled
[06/18/2024-02:02:08] [I] Spin-wait: Disabled
[06/18/2024-02:02:08] [I] Multithreading: Disabled
[06/18/2024-02:02:08] [I] CUDA Graph: Disabled
[06/18/2024-02:02:08] [I] Separate profiling: Disabled
[06/18/2024-02:02:08] [I] Time Deserialize: Disabled
[06/18/2024-02:02:08] [I] Time Refit: Disabled
[06/18/2024-02:02:08] [I] NVTX verbosity: 0
[06/18/2024-02:02:08] [I] Persistent Cache Ratio: 0
[06/18/2024-02:02:08] [I] Inputs:
[06/18/2024-02:02:08] [I] === Reporting Options ===
[06/18/2024-02:02:08] [I] Verbose: Enabled
[06/18/2024-02:02:08] [I] Averages: 10 inferences
[06/18/2024-02:02:08] [I] Percentiles: 90,95,99
[06/18/2024-02:02:08] [I] Dump refittable layers:Disabled
[06/18/2024-02:02:08] [I] Dump output: Disabled
[06/18/2024-02:02:08] [I] Profile: Disabled
[06/18/2024-02:02:08] [I] Export timing to JSON file:
[06/18/2024-02:02:08] [I] Export output to JSON file:
[06/18/2024-02:02:08] [I] Export profile to JSON file:
[06/18/2024-02:02:08] [I]
[06/18/2024-02:02:08] [I] === Device Information ===
[06/18/2024-02:02:08] [I] Selected Device: Orin
[06/18/2024-02:02:08] [I] Compute Capability: 8.7
[06/18/2024-02:02:08] [I] SMs: 8
[06/18/2024-02:02:08] [I] Compute Clock Rate: 0.918 GHz
[06/18/2024-02:02:08] [I] Device Global Memory: 14485 MiB
[06/18/2024-02:02:08] [I] Shared Memory per SM: 164 KiB
[06/18/2024-02:02:08] [I] Memory Bus Width: 64 bits (ECC disabled)
[06/18/2024-02:02:08] [I] Memory Clock Rate: 0.918 GHz
[06/18/2024-02:02:08] [I]
[06/18/2024-02:02:08] [I] TensorRT version: 8.5.2
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::BatchedNMSDynamic_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::BatchedNMS_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::BatchTilePlugin_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Clip_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::CoordConvAC version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::CropAndResizeDynamic version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::CropAndResize version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::DecodeBbox3DPlugin version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::DetectionLayer_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::EfficientNMS_Explicit_TF_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::EfficientNMS_Implicit_TF_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::EfficientNMS_ONNX_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::EfficientNMS_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::FlattenConcat_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::GenerateDetection_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::GridAnchor_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::GridAnchorRect_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::GroupNorm version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::InstanceNormalization_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::InstanceNormalization_TRT version 2
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::LayerNorm version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::LReLU_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::MultilevelCropAndResize_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::MultilevelProposeROI_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::MultiscaleDeformableAttnPlugin_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::NMSDynamic_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::NMS_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Normalize_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::PillarScatterPlugin version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::PriorBox_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::ProposalDynamic version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::ProposalLayer_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Proposal version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::PyramidROIAlign_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Region_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Reorg_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::ResizeNearest_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::ROIAlign_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::RPROI_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::ScatterND version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::SeqLen2Spatial version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::SpecialSlice_TRT version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::SplitGeLU version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::Split version 1
[06/18/2024-02:02:08] [V] [TRT] Registered plugin creator - ::VoxelGeneratorPlugin version 1
[06/18/2024-02:02:08] [I] [TRT] [MemUsageChange] Init CUDA: CPU +220, GPU +0, now: CPU 246, GPU 3029 (MiB)
[06/18/2024-02:02:09] [V] [TRT] Trying to load shared library libnvinfer_builder_resource.so.8.5.2
[06/18/2024-02:02:09] [V] [TRT] Loaded shared library libnvinfer_builder_resource.so.8.5.2
[06/18/2024-02:02:10] [I] [TRT] [MemUsageChange] Init builder kernel library: CPU +302, GPU +429, now: CPU 571, GPU 3480 (MiB)
[06/18/2024-02:02:10] [I] Start parsing network model
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format onnx2trt_onnx.ModelProto: 1:5: Invalid control characters encountered in text.
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format onnx2trt_onnx.ModelProto: 1:9: Interpreting non ascii codepoint 232.
[libprotobuf ERROR google/protobuf/text_format.cc:298] Error parsing text-format onnx2trt_onnx.ModelProto: 1:9: Message type “onnx2trt_onnx.ModelProto” has no field named “ptrt”.
[06/18/2024-02:02:10] [E] [TRT] ModelImporter.cpp:688: Failed to parse ONNX model from file: resnet18_detector_fp32.onnx
[06/18/2024-02:02:10] [E] Failed to parse onnx file
[06/18/2024-02:02:10] [I] Finish parsing network model
[06/18/2024-02:02:10] [E] Parsing model failed
[06/18/2024-02:02:10] [E] Failed to create engine from model or file.
[06/18/2024-02:02:10] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8502] # /usr/src/tensorrt/bin/trtexec --onnx=resnet18_detector.onnx --saveEngine=/home/orin/Documents/resnet_detector.engine --workspace=2048 --verbose

Thanks!

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 499

Trending Articles