Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/execution_providers/QNN-ExecutionProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ download the Qualcomm AI Runtime SDK (QAIRT SDK) from [https://qpm.qualcomm.com/
ONNX Runtime QNN EP has been built and tested with the following SDK version combinations on Windows:
| QNN EP Version | QAIRT SDK Version | ONNX Runtime Version |
|----------------|-------------------|----------------------|
| v2.0.0 | v2.42.0 | v1.24.1 |
| v2.0.0 | v2.45.0 | v1.24.4 |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should match QNN EP v2.0.0 with QAIRT SDK v2.42.0, and match QNN EP v2.1.0 with QAIRT SDK v2.45.0.


> **Note**: ONNX Runtime QNN EP is built and tested by using the arm64 ONNX Runtime SDK (ex: onnxruntime-win-arm64-1.24.0.zip).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1760,10 +1760,13 @@ Ort::Status QnnBackendManager::SetupBackend(
if (share_ep_contexts && !load_from_cached_context) {
#if (defined(__aarch64__) || defined(_M_ARM64)) && \
(QNN_API_VERSION_MAJOR < 2 || (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR < 34))
ORT_CXX_LOG_PTR(logger_ptr_, ORT_LOGGING_LEVEL_WARNING, ("FINDME: " + std::to_string(QNN_API_VERSION_MAJOR) + "." + std::to_string(QNN_API_VERSION_MINOR) + "." + std::to_string(QNN_API_VERSION_PATCH)).c_str());
ORT_CXX_LOG_PTR(logger_ptr_,
ORT_LOGGING_LEVEL_WARNING,
"Weight sharing on Windows arm64 device requires QNN API version >=2.34. Since Current version is too old, disabling the Weight sharing.");
#elif defined(__ANDROID__)
ORT_CXX_LOG_PTR(logger_ptr_,
ORT_LOGGING_LEVEL_WARNING,
"Weight sharing on Android devices is disabled");
#else
enable_htp_weight_sharing = true;
#endif
Expand Down
18 changes: 16 additions & 2 deletions onnxruntime/test/providers/qnn/qnn_device_compatibility_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,16 @@ TEST_F(QnnDeviceCompatibilityTests, GPUDeviceWithQualcommVendorIsCompatible) {
env_, onnxruntime::kQnnExecutionProvider, &gpu_device, &details));
ASSERT_NE(details, nullptr);

// Verify compatible (no incompatibility reasons)
uint32_t reasons_bitmask = 0xFFFFFFFF;
// Check if GPU device is incompatible for any reason - if so, skip this test
uint32_t reasons_bitmask = 0;
ASSERT_ORTSTATUS_OK(api_->DeviceEpIncompatibilityDetails_GetReasonsBitmask(details, &reasons_bitmask));

if (reasons_bitmask != 0u) {
api_->ReleaseDeviceEpIncompatibilityDetails(details);
GTEST_SKIP() << "GPU device is not compatible with QNN EP on this machine, skipping compatibility test";
}

// Verify compatible (no incompatibility reasons)
EXPECT_EQ(reasons_bitmask, 0u) << "GPU device with Qualcomm vendor should be compatible with QNN EP";

int32_t error_code = -1;
Expand Down Expand Up @@ -349,6 +356,13 @@ TEST_F(QnnDeviceCompatibilityTests, GPUDeviceIncompatibilityDetailsWithMissingDe
GTEST_SKIP() << "GPU device is compatible with QNN EP, skipping incompatibility test";
}

if ((reasons_bitmask & OrtDeviceEpIncompatibility_MISSING_DEPENDENCY) == 0) {
// The GPU library is present but incompatible for another reason (e.g., driver failure).
// This test requires the GPU library itself to be absent; skip if that's not the case.
api_->ReleaseDeviceEpIncompatibilityDetails(details);
GTEST_SKIP() << "GPU library is present; MISSING_DEPENDENCY scenario cannot be reproduced";
}

// Verify incompatibility reason includes MISSING_DEPENDENCY
EXPECT_TRUE((reasons_bitmask & OrtDeviceEpIncompatibility_MISSING_DEPENDENCY) != 0)
<< "Expected MISSING_DEPENDENCY flag in incompatibility reasons";
Expand Down
18 changes: 18 additions & 0 deletions onnxruntime/test/providers/qnn/qnn_ep_context_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2159,6 +2159,8 @@ TEST_F(QnnHTPBackendTests, QnnContextShareAcrossSessions) {
#if (defined(__aarch64__) || defined(_M_ARM64)) && \
!(QNN_API_VERSION_MAJOR > 2 || (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR >= 34))
GTEST_SKIP() << "HTP weight sharing on ARM64 requires QNN API version >= 2.34.";
#elif defined(__ANDROID__)
GTEST_SKIP() << "Weight sharing on Android devices is disabled";
#endif
ProviderOptions provider_options;
provider_options["backend_type"] = "htp";
Expand Down Expand Up @@ -2270,6 +2272,13 @@ TEST_F(QnnHTPBackendTests, QnnContextShareAcrossSessions) {
}

TEST_F(QnnHTPBackendTests, DISABLED_VTCMBackupBufferSharing) {
#if (defined(__aarch64__) || defined(_M_ARM64)) && \
!(QNN_API_VERSION_MAJOR > 2 || (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR >= 34))
GTEST_SKIP() << "HTP weight sharing on ARM64 requires QNN API version >= 2.34.";
#elif defined(__ANDROID__)
GTEST_SKIP() << "Weight sharing on Android devices is disabled";
#endif

// Disable the test on test-android job in Qualcomm CI here while we investigate
// but do not upstream this change.
ProviderOptions provider_options;
Expand Down Expand Up @@ -2381,6 +2390,13 @@ TEST_F(QnnHTPBackendTests, DISABLED_VTCMBackupBufferSharing) {
}

TEST_F(QnnHTPBackendTests, FileMapping_Off) {
#if (defined(__aarch64__) || defined(_M_ARM64)) && \
!(QNN_API_VERSION_MAJOR > 2 || (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR >= 34))
GTEST_SKIP() << "HTP weight sharing on ARM64 requires QNN API version >= 2.34.";
#elif defined(__ANDROID__)
GTEST_SKIP() << "Weight sharing on Android devices is disabled";
#endif

ProviderOptions provider_options;
provider_options["backend_type"] = "htp";
provider_options["offload_graph_io_quantization"] = "0";
Expand Down Expand Up @@ -2502,6 +2518,8 @@ TEST_F(QnnHTPBackendTests, QnnContextGenWeightSharingSessionAPI) {
#if (defined(__aarch64__) || defined(_M_ARM64)) && \
!(QNN_API_VERSION_MAJOR > 2 || (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR >= 34))
GTEST_SKIP() << "HTP weight sharing on ARM64 requires QNN API version >= 2.34.";
#elif defined(__ANDROID__)
GTEST_SKIP() << "Weight sharing on Android devices is disabled";
#endif
ProviderOptions provider_options;
provider_options["backend_type"] = "htp";
Expand Down
6 changes: 3 additions & 3 deletions qcom/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ java_windows_x86_64:
content_root: jdk-{version}
bindir: bin
model_zoo:
version: 2026-01-13
version: 2026-04-03
url: http://ort-ep-win-01.na.qualcomm.com:8000/model-zoo/model-zoo-{version}.zip
sha256: 32853861b80c1ba913591a870dad2d1626ddb1683ac4750b65b1f0148ec9c7a7
sha256: 3a870c41c7b1aa8e8e2d7f2fd6dcc6c47de73da57ca3dc26b4f37d436c05a29e
content_root: model-zoo
ninja_linux_aarch64:
version: 1.12.1
Expand Down Expand Up @@ -177,7 +177,7 @@ python_314_windows_arm64:
version: 3.14.3
md5: 1183951d055ef6c0ae1fb686b3342a6f
qairt:
version: 2.44.0.260225
version: 2.45.0.260326
url: https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/{version}/v{version}.zip
content_root: qairt/{version}
bindir: bin
Expand Down