NVIDIA / TensorRT

NVIDIA® TensorRT™ is an SDK for high-performance deep learning inference on NVIDIA GPUs. This repository contains the open source components of TensorRT.
https://developer.nvidia.com/tensorrt
Apache License 2.0
10.67k stars 2.12k forks source link

Problems with building cudla models using EngineCapability::kDLA_STANDALONE #2752

Closed jacker-whh closed 1 year ago

jacker-whh commented 1 year ago

Description

Problems with building cudla models using EngineCapability::kDLA_STANDALONE. We want to use patterns kDLA_STANDALONE to run the model, but we encounter the following error when compiling the model.

[01/02/1970-22:13:57] [V] [TRT] Original: 97 layers [01/02/1970-22:13:57] [V] [TRT] After dead-layer removal: 97 layers [01/02/1970-22:13:58] [E] Error[2]: [foreignNode.cpp::determineCandidateForeignNodes::910] Error Code 2: Internal Error (Safety certified DLA should only have one graph for the whole network.) [01/02/1970-22:13:58] [E] Error[2]: [builder.cpp::buildSerializedNetwork::636] Error Code 2: Internal Error (Assertion engine != nullptr failed. ) [01/02/1970-22:13:58] [E] Engine could not be created from network [01/02/1970-22:13:58] [E] Building engine failed [01/02/1970-22:13:58] [E] Failed to create engine from model or file. [01/02/1970-22:13:58] [E] Engine set up failed

You can't go wrong without using mode kDLA_STANDALONE. I know that normal models do have many foreignNodes, how do we use kDLA_STANDALONE to build models with multiple foreignNodes.

Environment

TensorRT Version: 8.4.11 NVIDIA GPU: orin NVIDIA Driver Version: CUDA Version: CUDNN Version: Operating System: Python Version (if applicable): Tensorflow Version (if applicable): PyTorch Version (if applicable): Baremetal or Container (if so, version):

zerollzeng commented 1 year ago

Your model has structures like loops or condition? I guess there are sub graph in your onnx graph.

ttyio commented 1 year ago

Closing since no activity for more than 3 weeks, pls reopen if you still have question, thanks!