Avoiding the creation of unnamed layers

Hello,

I was able to convert a GAN (pix2pix) ONNX model to a TensorRT plan and get the profiling data for it. However, I noticed that after the convolution transpose or deconvolution layers, there are around 25 unnamed layers created with the operations Shape, Concatenation, Constant, Gather and ElementWise. These were not present in the original model so why are they added? Is there a way to prevent these layers from being added?

My aim is to ensure that all the layers are DLA compatible so that the entire model can be run on the DLA without the need for GPU fallback. I notice that these unnamed layers cannot be run on the DLA so it falls back to GPU. I would like to prevent this from happening so is there a way to at least make sure that the TensorRT added layers are DLA compatible?

As an alternative, how can I use DeepStream to execute part of the model in the DLA and the other part in GPU?

Hello,

Is there any update? Should I provide any files?

Dear @ashiyana,
Can you provide ONNX model file and trtexec log.

ONNX model link

generator_log_file.txt (40.0 KB)

I have attached both. When I analyse the model with netron, I do not see the unnamed layers present.

Also, I used the TensorRT Python library to create the plan.

Hello,

Is there an update? Would you like additional info?

Dear @ashiyana,
Does your model use dynamic shape? DLA does not support dynamic shape.

Hello,

Thank you for your help.
I am using explicit batch to create the network and setting the input shape in the optimization profile. Is this what you mean?

But for other models I created using the same TensorRT setup, I did not see these unnamed layers and they were DLA executable (apart from the deconvolution layers with padding).

Can you change the model to use static input and test if it works?

How can I go about this?

I quickly modified the model using onnx graph surgeon tool to have static input . FYI, onnx surgeon usage examples are at TensorRT/tools/onnx-graphsurgeon/examples at release/8.5 · NVIDIA/TensorRT · GitHub
Model shared in private message

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.