From e426dec3c2b8290437294a5155e48e6dbeaad71e Mon Sep 17 00:00:00 2001 From: Karim Vadsariya Date: Wed, 29 Jan 2025 00:08:05 -0800 Subject: [PATCH] Build generic lib when primary ep is selected and qnn is not static --- tools/ci_build/build.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index cc733f859f..c1e84ddf0c 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -1543,12 +1543,6 @@ def generate_build_tree( "-Donnxruntime_USE_FULL_PROTOBUF=ON", ] - # When this flag is enabled, that means we only build ONNXRuntime shared library, expecting some compatible EP - # shared lib being build in a seperate process. So we skip the test for now as ONNXRuntime shared lib built under - # this flag is not expected to work alone - if args.enable_generic_interface: - cmake_args += ["-Donnxruntime_BUILD_UNIT_TESTS=OFF"] - if args.enable_lazy_tensor: import torch @@ -2651,6 +2645,9 @@ def main(): print(args) + if args.build_shared_lib and args.use_qnn != "static_lib" and (args.use_tensorrt or args.use_openvino or args.use_vitisai or args.use_qnn): + args.enable_generic_interface = True + if os.getenv("ORT_BUILD_WITH_CACHE") == "1": args.use_cache = True @@ -2669,9 +2666,6 @@ def main(): # Disable ONNX Runtime's builtin memory checker args.disable_memleak_checker = True - if args.enable_generic_interface: - args.test = False - # If there was no explicit argument saying what to do, default # to update, build and test (for native builds). if not (args.update or args.clean or args.build or args.test or args.gen_doc):