Skip to content

Commit

Permalink
Fix numpy==1.25.2 for QNN on Windows ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianlizarraga committed Feb 1, 2024
1 parent eb0ce86 commit ca95ece
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions requirements-qnn-win-arm64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coloredlogs
flatbuffers
numpy == 1.25.2
packaging
protobuf
sympy
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def parse_arg_remove_string(argv, arg_name_equal):
rocm_version = None
is_rocm = False
is_openvino = False
use_qnn = False
# The following arguments are mutually exclusive
if wheel_name_suffix == "gpu":
# TODO: how to support multiple CUDA versions?
Expand Down Expand Up @@ -85,6 +86,7 @@ def parse_arg_remove_string(argv, arg_name_equal):
# keep the same name since AzureEP will release with CpuEP by default.
pass
elif parse_arg_remove_boolean(sys.argv, "--use_qnn"):
use_qnn = True
package_name = "onnxruntime-qnn"

# PEP 513 defined manylinux1_x86_64 and manylinux1_i686
Expand Down Expand Up @@ -459,6 +461,10 @@ def finalize_options(self):
"Operating System :: MacOS",
]

# QNN on Windows ARM64 requires a specific version of NumPy (1.25.2 as of Feb 2024).
if use_qnn and platform.system() == "Windows" and platform.machine() == "ARM64":
requirements_file = "requirements-qnn-win-arm64.txt"

if enable_training or enable_training_apis:
packages.append("onnxruntime.training")
if enable_training:
Expand Down

0 comments on commit ca95ece

Please sign in to comment.