Loop importer.Loop operator has a body subgraph.onnx-tensorrt assumes that the number of inputs in the loop body subgraph is at least the number of inputs on the outer Loop node.Loop node with 3 inputs (trip-count, condition, state0) but the body graph contains only 2 inputs, the parser indexes body.input(2) out-of-bounds while mapping state variables.poc_loop_body_input_oob.onnx – malformed ONNX modelmake_poc_loop_body_input_oob.py – generator script (does not require the onnx pip package)gen/onnx_pb2.py – protobuf bindings generated from onnx.prototrtexectrtexec --onnx=poc_loop_body_input_oob.onnx --verbosenvonnxparser::IParser::parseFromFile().1# Requires: python3 + protobuf runtime, and a generated onnx_pb2 (already included in gen/)
2python3 make_poc_loop_body_input_oob.py poc_loop_body_input_oob.onnx