Skip to content

Commit

Permalink
Fix build interface logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Karim Vadsariya committed Jan 21, 2025
1 parent fb90860 commit ae0b626
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,16 @@ def generate_build_tree(
disable_optional_type = "optional" in types_to_disable
disable_sparse_tensors = "sparsetensor" in types_to_disable

enable_qnn_interface = bool((args.arm64 or args.arm or args.arm64ec) and (args.enable_generic_interface))
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"),
Expand Down

0 comments on commit ae0b626

Please sign in to comment.