Skipping tactic 0 due to Myelin error: Mismatched shape for tensor

Description

I have met a strange problem that mismatched shape for tensor, shape of grid1 requirs 1/8 preFrame and grid2 requirs 1/16 preFrame

Environment

TensorRT Version: 8.2.0.6
GPU Type: 2080Ti
Nvidia Driver Version:
CUDA Version:
CUDNN Version:
Operating System + Version:
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

Relevant Files

Please attach or include links to any models, data, files, or scripts necessary to reproduce your issue. (Github repo, Google Drive, Dropbox, etc.)

Steps To Reproduce

[11/25/2022-16:35:10] [W] [TRT] Skipping tactic 0 due to Myelin error: Mismatched shape for tensor 1633’ForeignNode[671___Div_221], current shape:f32,[1,2,32,32], vs. expected shape:f32,[1,2,512,512].
[11/25/2022-16:35:10] [V] [TRT] Fastest Tactic: -3360065831133338131 Time: inf
[11/25/2022-16:35:10] [V] [TRT] Deleting timing cache: 699 entries, 2322 hits
[11/25/2022-16:35:10] [E] Error[10]: [optimizer.cpp::computeCosts::1981] Error Code 10: Internal Error (Could not find any implementation for node {ForeignNode[671…Div_221]}.)
[11/25/2022-16:35:10] [E] Error[2]: [builder.cpp::buildSerializedNetwork::561] Error Code 2: Internal Error (Assertion enginePtr != nullptr failed. )
[11/25/2022-16:35:10] [E] Engine could not be created from network
[11/25/2022-16:35:10] [E] Building engine failed
[11/25/2022-16:35:10] [E] Failed to create engine from model.
[11/25/2022-16:35:10] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8200] # ./trtexec --onnx=/home/RIFE_lite.onnx --device=0 --minShapes=preFrame:1x3x512x512,nextFrame:1x3x512x512,position:1x1x512x512,grid:1x2x512x512,grid1:1x2x64x64,grid2:1x2x32x32 --optShapes=preFrame:1x3x512x512,nextFrame:1x3x512x512,position:1x1x512x512,grid:1x2x512x512,grid1:1x2x64x64,grid2:1x2x32x32 --maxShapes=preFrame:1x3x1024x1024,nextFrame:1x3x1024x1024,position:1x1x1024x1024,grid:1x2x1024x1024,grid1:1x2x128x128,grid2:1x2x64x64 --verbose --workspace=2048

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:

  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.

In case you are still facing issue, request you to share the trtexec “”–verbose"" log for further debugging
Thanks!