diff --git a/docs/execution_providers/QNN-ExecutionProvider.md b/docs/execution_providers/QNN-ExecutionProvider.md index 82f334605c..bf0798e499 100644 --- a/docs/execution_providers/QNN-ExecutionProvider.md +++ b/docs/execution_providers/QNN-ExecutionProvider.md @@ -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 | > **Note**: ONNX Runtime QNN EP is built and tested by using the arm64 ONNX Runtime SDK (ex: onnxruntime-win-arm64-1.24.0.zip). diff --git a/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc b/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc index 20471418da..05eb9b7016 100644 --- a/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc +++ b/onnxruntime/core/providers/qnn/builder/qnn_backend_manager.cc @@ -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 diff --git a/onnxruntime/test/providers/qnn/qnn_device_compatibility_test.cc b/onnxruntime/test/providers/qnn/qnn_device_compatibility_test.cc index 9f73d705c8..2869b95367 100644 --- a/onnxruntime/test/providers/qnn/qnn_device_compatibility_test.cc +++ b/onnxruntime/test/providers/qnn/qnn_device_compatibility_test.cc @@ -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; @@ -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"; diff --git a/onnxruntime/test/providers/qnn/qnn_ep_context_test.cc b/onnxruntime/test/providers/qnn/qnn_ep_context_test.cc index 38e6d4bbb8..094a589cd5 100644 --- a/onnxruntime/test/providers/qnn/qnn_ep_context_test.cc +++ b/onnxruntime/test/providers/qnn/qnn_ep_context_test.cc @@ -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"; @@ -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; @@ -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"; @@ -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"; diff --git a/qcom/packages.yml b/qcom/packages.yml index f8977ba5c7..f7344c3450 100644 --- a/qcom/packages.yml +++ b/qcom/packages.yml @@ -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 @@ -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