From a747a00cd30b96c0e3742e1f03ad22cce65c492a Mon Sep 17 00:00:00 2001 From: Chi Lo <54722500+chilo-ms@users.noreply.github.com> Date: Thu, 18 Apr 2024 19:39:08 -0700 Subject: [PATCH] [TensorRT EP] Use protobuf with debug build on Windows (#20378) TRT EP implicitly uses oss_parser with debug build on Windows, therefore it should use protobuf rather than protobuf-lite. --- tools/ci_build/build.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index d2119986dc..33dc403777 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1243,11 +1243,16 @@ def generate_build_tree( "-Donnxruntime_USE_OPENVINO_AUTO=" + ("ON" if args.use_openvino.startswith("AUTO") else "OFF"), ] - # VitisAI and OpenVINO providers currently only support - # full_protobuf option. TensorRT provider only requires it if built with oss_parser + # VitisAI and OpenVINO providers currently only support full_protobuf option. + # TensorRT provider only requires it if built with oss_parser, and + # it implicitly uses oss_parser with debug build on Windows. + # + # Note: oss_parser will support protobuf-lite in TRT 10 GA, so TRT EP will fully + # support protobuf-lite then. if ( args.use_full_protobuf or (args.use_tensorrt and args.use_tensorrt_oss_parser) + or (args.use_tensorrt and is_windows() and "Debug" in args.config) or args.use_openvino or args.use_vitisai or args.gen_doc