-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
some model convert error question when tensorrt backend #9853
Comments
Hi, sevenlix, thank you for your reply, I tried the onnxruntime/python/tools/symbolic_shape_infer.py on my onnx model, but got a error: symbolic_shape_infer.py --input=./fs.onnx please give me some advice for this error, thank you! |
Please run onnx checker to make sure the model is valid. |
The model is correct because the ORT could load the model and do inference as expected. We want to convert the ONNX model to TensorRT, it seems the error comes from the mask code:
We also tried using torch2trt to export the TRT model directly, but encountered the below error:
This error is also from the mask code, it seems the ONNX to TRT error and the torch2trt error are from the same part. This dynamically generated mask is a must for our model because of the dynamic predicted decoder length. It seems TRT does not support the torch.arange function? |
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
Hi, I am testing onnx-tensorrt backend, block at the first step:
when I ran my test onnx model in tensorrt backend, I got the warns and errors as below:
warn: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
error: [shapeContext.cpp::volumeOfShapeTensor::497] Error Code 2: Internal Error (Assertion hasAllConstantValues(t.extent) && "shape tensor must have build-time extent" failed.)
warn: Output type must be INT32 for shape outputs
loglevel:1 tag:ONNXRuntime msg:Exception during initialization:
error: SubGraphCollection_t onnxruntime::TensorrtExecutionProvider::GetSupportedList(SubGraphCollection_t, int, int, const onnxruntime::GraphViewer&, bool*) const [ONNXRuntimeError] : 1 : FAIL : TensorRT input: 252 has no shape specified. Please run shape inference on the onnx model first. Details can be found in https://www.onnxruntime.ai/docs/reference/execution-providers/TensorRT-ExecutionProvider.html#shape-inference-for-tensorrt-subgraphs
env:
ubuntu 20.04 & onnxruntime 1.9.1 & tensorrt:8.0.3.4
I'm newer for onnxruntime & tensorrt, please give me some explain about the warn&error and some advices to run succeed,
thank you very much!!
attention: my model is running ok under cuda backend.
The text was updated successfully, but these errors were encountered: