From 7727b4b909f29d0ff6d3f469d0df42c9bddecb66 Mon Sep 17 00:00:00 2001 From: George Wu Date: Tue, 24 Sep 2024 14:34:05 -0700 Subject: [PATCH] [TensorRT EP] update gen_trt_engine_wrapper_onnx_model.py script (#22184) update script which was using deprecated num_bindings to num_io_tensors tested on an engine dumped by trtexec and loaded the engine using onnxruntime-gpu 1.19.2 python package. --- .../python/tools/tensorrt/gen_trt_engine_wrapper_onnx_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/tools/tensorrt/gen_trt_engine_wrapper_onnx_model.py b/onnxruntime/python/tools/tensorrt/gen_trt_engine_wrapper_onnx_model.py index b94c2cb76a635..1180945d5b5dc 100644 --- a/onnxruntime/python/tools/tensorrt/gen_trt_engine_wrapper_onnx_model.py +++ b/onnxruntime/python/tools/tensorrt/gen_trt_engine_wrapper_onnx_model.py @@ -38,7 +38,7 @@ def __init__(self, args): # Deserialize an TRT engine runtime = trt.Runtime(logger) engine = runtime.deserialize_cuda_engine(engine_buffer) - num_bindings = engine.num_bindings + num_bindings = engine.num_io_tensors input_tensors = [] output_tensors = []