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.
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