From 7c5c374283fe78891e32f82bae5981aec210b298 Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Tue, 19 Sep 2023 23:01:52 +0000 Subject: [PATCH] fix bug --- onnxruntime/python/onnxruntime_inference_collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_inference_collection.py b/onnxruntime/python/onnxruntime_inference_collection.py index 2c865e5beaf12..4250ebd760516 100644 --- a/onnxruntime/python/onnxruntime_inference_collection.py +++ b/onnxruntime/python/onnxruntime_inference_collection.py @@ -522,7 +522,7 @@ def _register_ep_custom_ops(self, session_options, providers, provider_options): for i in range(len(providers)): if providers[i] == "TensorrtExecutionProvider": C.register_tensorrt_plugins_as_custom_ops(session_options, provider_options[i]) - elif (isinstance(providers[i], tuple) and providers[0] == "TensorrtExecutionProvider"): + elif (isinstance(providers[i], tuple) and providers[i][0] == "TensorrtExecutionProvider"): C.register_tensorrt_plugins_as_custom_ops(session_options, providers[i][1]) class IOBinding: