NVIDIA-AI-IOT/nanosam

trtexec Failed for mobile_sam_mask_decoder.onnx

Opened this issue · 4 comments

Thanks for this fantastic work!
when i follow the instruction below errors occurred

Warning: Slice op /Slice_slice cannot slice along a uniform dimension.
Warning: Slice op /Slice_slice cannot slice along a uniform dimension.
[09/20/2023-07:55:09] [E] Error[10]: [optimizer.cpp::computeCosts::2011] Error Code 10: Internal Error (Could not find any implementation for node {ForeignNode[onnx::MatMul_1729 + (Unnamed Layer* 316) [Shuffle]...(Unnamed Layer* 1451) [Shuffle]]}.)
[09/20/2023-07:55:09] [E] Error[2]: [builder.cpp::buildSerializedNetwork::609] Error Code 2: Internal Error (Assertion enginePtr != nullptr failed. )
[09/20/2023-07:55:09] [E] Engine could not be created from network
[09/20/2023-07:55:09] [E] Building engine failed
[09/20/2023-07:55:09] [E] Failed to create engine from model.
[09/20/2023-07:55:09] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8201] # /usr/src/tensorrt/bin/trtexec --onnx=data/mobile_sam_mask_decoder.onnx --saveEngine=data/mobile_sam_mask_decoder.engine --minShapes=point_coords:1x1x2,point_labels:1x1 --optShapes=point_coords:1x1x2,point_labels:1x1 --maxShapes=point_coords:1x10x2,point_labels:1x10

the tensorRT version is 8.2.1.8
jetpack :4.6.1

Hi @shenGrant ,

Thanks for reaching out.

I haven't tested against this version of TensorRT. It's possible there is a layer that isn't supported by TensorRT for this version.

Just to make sure it's not an issue with the generated ONNX file. Are you able to build with this file? mobile_sam_mask_decoder.onnx

If not, is it possible for you to upgrade to a later version of TensorRT?

John

Hi John,
Thanks for your advice.

tensorrt 8.6.1 is fine.

I am facing issue converting the resnet model into engine can you please provide the onnx file for that?