While parse the attached onnx model the following error is raised:
[shuffleNode.cpp::nvinfer1::builder::ShuffleNode::symbolicExecute::387] Error Code 4: Internal Error (Reshape_77: IShuffleLayer applied to shape tensor must have 0 or 1 reshape dimensions: dimensions were [-1,2])
Environment
TensorRT Version: 8.2.2.1 GPU Type: Quadro RTX 3000 Nvidia Driver Version: 471.11 CUDA Version: 11.2 CUDNN Version: 8.1.1 Operating System + Version: Window 10 Python Version (if applicable): 3.6.8 TensorFlow Version (if applicable): NA PyTorch Version (if applicable): NA Baremetal or Container (if container which image + tag): Baremetal
builder = trt.Builder(self.logger)
networkFlags = 1 << (int)(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
network = builder.create_network(self.networkFlags)
parser = trt.OnnxParser(network, Logger())
# Open the model in binary format - set its data into buffer
modelFD = open(‘grid_sample.onnx’, ‘rb’)
modelBuffer = modelFD.read()
# Check and determine whether or not an Onnx model is compatible with TRT
supportsModelInfo = parser.supports_model(modelBuffer)
I think padding related node is causing error, we don’t support 2D shape tensors yet. We can try workaround constant-fold with polygraphy. After this we are able to successfully generate engine. Please try
I am getting the exact same error as I am trying to convert my swin instance segmentation ONNX model to tensorrt using trtexec on my Jeston AGX Xavier! However, I am very unsure on how to use this function. I have TensorRT (8.2.1.8) installed natively on the Jetson with Jetpack 4.6.2. But where can I find this polygraphy function?
I found trtexec under /usr/src/tensorrt/bin so I’m guessing it should be somewhere similar… I know this might be a very beginners question.
If you’d like to upload my ONNX model for you to check, but it’s too big :(