Skip to content

Commit

Permalink
Remove commented code and enable interface for all eps by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Karim Vadsariya committed Jan 24, 2025
1 parent 9857e34 commit 9f52af7
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,17 +1021,6 @@ def generate_build_tree(
disable_optional_type = "optional" in types_to_disable
disable_sparse_tensors = "sparsetensor" in types_to_disable

enable_qnn_interface = False
if args.enable_generic_interface:
host_arch = platform.machine()
if host_arch == "AMD64":
if args.arm64 or args.arm or args.arm64ec:
enable_qnn_interface = True
elif host_arch == "ARM64":
enable_qnn_interface = True
else:
raise BuildError("unknown python arch")

cmake_args += [
"-Donnxruntime_RUN_ONNX_TESTS=" + ("ON" if args.enable_onnx_tests else "OFF"),
"-Donnxruntime_GENERATE_TEST_REPORTS=ON",
Expand Down Expand Up @@ -1061,15 +1050,15 @@ def generate_build_tree(
+ ("ON" if args.use_tensorrt_builtin_parser and not args.use_tensorrt_oss_parser else "OFF"),
# interface variables are used only for building onnxruntime/onnxruntime_shared.dll but not EPs
"-Donnxruntime_USE_TENSORRT_INTERFACE="
+ ("ON" if (args.enable_generic_interface and not enable_qnn_interface) else "OFF"),
+ ("ON" if args.enable_generic_interface else "OFF"),
"-Donnxruntime_USE_CUDA_INTERFACE="
+ ("ON" if (args.enable_generic_interface and not enable_qnn_interface) else "OFF"),
+ ("ON" if args.enable_generic_interface else "OFF"),
"-Donnxruntime_USE_OPENVINO_INTERFACE="
+ ("ON" if (args.enable_generic_interface and not enable_qnn_interface) else "OFF"),
+ ("ON" if args.enable_generic_interface else "OFF"),
"-Donnxruntime_USE_VITISAI_INTERFACE="
+ ("ON" if (args.enable_generic_interface and not enable_qnn_interface) else "OFF"),
+ ("ON" if args.enable_generic_interface else "OFF"),
"-Donnxruntime_USE_QNN_INTERFACE="
+ ("ON" if (args.enable_generic_interface and enable_qnn_interface) else "OFF"),
+ ("ON" if args.enable_generic_interface else "OFF"),
# set vars for migraphx
"-Donnxruntime_USE_MIGRAPHX=" + ("ON" if args.use_migraphx else "OFF"),
"-Donnxruntime_DISABLE_CONTRIB_OPS=" + ("ON" if args.disable_contrib_ops else "OFF"),
Expand Down Expand Up @@ -2791,7 +2780,6 @@ def main():
source_dir = os.path.normpath(os.path.join(script_dir, "..", ".."))

# if using cuda, setup cuda paths and env vars
# cuda_home, cudnn_home = setup_cuda_vars(args)
cuda_home = ""
cudnn_home = ""
if args.use_cuda:
Expand Down

0 comments on commit 9f52af7

Please sign in to comment.