From 0e7334ea26577c2df37e2bb4a284035c4cea087a Mon Sep 17 00:00:00 2001 From: Chi Lo Date: Wed, 24 Jan 2024 01:38:28 +0000 Subject: [PATCH] lintrunner -a --- onnxruntime/python/onnxruntime_inference_collection.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/onnxruntime/python/onnxruntime_inference_collection.py b/onnxruntime/python/onnxruntime_inference_collection.py index e967f2bd6ae29..09f768f53ea65 100644 --- a/onnxruntime/python/onnxruntime_inference_collection.py +++ b/onnxruntime/python/onnxruntime_inference_collection.py @@ -514,7 +514,11 @@ def _register_ep_custom_ops(self, session_options, providers, provider_options, for i in range(len(providers)): if providers[i] in available_providers and providers[i] == "TensorrtExecutionProvider": C.register_tensorrt_plugins_as_custom_ops(session_options, provider_options[i]) - elif isinstance(providers[i], tuple) and providers[i][0] in available_providers and providers[i][0] == "TensorrtExecutionProvider": + elif ( + isinstance(providers[i], tuple) + and providers[i][0] in available_providers + and providers[i][0] == "TensorrtExecutionProvider" + ): C.register_tensorrt_plugins_as_custom_ops(session_options, providers[i][1])