Tensorrt8 shape tensor as input node must have fixed shape?

Description

Hi
There is a onnx model , input node ‘y’ is a dynamic shape tensor , meanwhile it will be set as the second input of a reshape op. I think this input ‘y’ is a shape tensor.
image

Then I’m trying to check the model by polygraphy inspect

polygraphy inspect model test.onnx --display-as trt

an exception such as:

[shapeContext.cpp::volumeOfShapeTensor::497] Error Code 2: Internal Error (Assertion hasAllConstantValues(t.extent) && "shape tensor must have build-time extent" failed.)

Modify the model and set the input as fixed shape , inspect successfully

[I] ==== TensorRT Network ====
Name: Unnamed Network 0 | Explicit Batch Network

---- 2 Network Input(s) ----
{x [dtype=float32, shape=(-1, 3, -1, -1)],
 y [dtype=int32, shape=(3,)]}

---- 1 Network Output(s) ----
{26 [dtype=float32, shape=(-1, -1, 100)]}

Is the shape of an input shape tensor must be fixed to TensorRT ?

TensorRT Version: 8
GPU: T4

Hi,
Request you to share the ONNX model and the script if not shared already so that we can assist you better.
Alongside you can try few things:
https://docs.nvidia.com/deeplearning/tensorrt/quick-start-guide/index.html#onnx-export

  1. validating your model with the below snippet

check_model.py

import sys
import onnx
filename = yourONNXmodel
model = onnx.load(filename)
onnx.checker.check_model(model).
2) Try running your model with trtexec command.
https://github.com/NVIDIA/TensorRT/tree/master/samples/opensource/trtexec
In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging
Thanks!