Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update QNN default version to 2.31 #23573

Merged
merged 3 commits into from
Feb 5, 2025
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
9 changes: 9 additions & 0 deletions onnxruntime/test/onnx/TestCase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,15 @@ std::unique_ptr<std::set<BrokenTest>> GetBrokenTests(const std::string& provider
"output=Y:expected 1 (3f800000), got 4 (40800000), diff: 3, tol=0.002 idx=24. 13 of 49 differ. CPU test passed."});
broken_tests->insert({"convtranspose_group_2", "Segmentation fault (core dumped). CPU test passed."});
broken_tests->insert({"convtranspose_group_2_image_3", "Segmentation fault (core dumped). CPU test passed."});
// Fails with QNN 2.31 on Windows x64 for CPU
broken_tests->insert({"gelu_tanh_2", "y:expected -0.0131778 (bc57e7d5), got -0.0136333 (bc5f5e38), diff: 0.000455472, tol=2.31778e-05."});
broken_tests->insert({"convtranspose_pad", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"convtranspose_pads", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"convtranspose_output_shape", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"convtranspose_kernel_shape", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"convtranspose_1d", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"convtranspose", "Access violation 0xc000005 from call graphAddNode."});
broken_tests->insert({"averagepool_2d_ceil", "result differs. expected 13.5 (41580000), got 0 (0)"});
}

#ifdef DISABLE_CONTRIB_OPS
Expand Down
36 changes: 6 additions & 30 deletions onnxruntime/test/providers/qnn/conv_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ TEST_F(QnnCPUBackendTests, Convf32_AutoPadLower) {
}

// Tests ConvTranspose's auto_pad value "SAME_LOWER" (compares to CPU EP).
TEST_F(QnnCPUBackendTests, ConvTransposef32_AutoPadLower) {
// 2.31 Exception from qnn_interface.graphAddNode
// unknown file: error: SEH exception with code 0xc0000005 thrown in the test body
TEST_F(QnnCPUBackendTests, DISABLED_ConvTransposef32_AutoPadLower) {
RunCPUConvOpTest("ConvTranspose",
TestInputDef<float>({1, 1, 3, 3}, false, -3.0f, 3.0f), // Random dynamic input
TestInputDef<float>({1, 2, 2, 2}, false, -1.0f, 1.0f), // Random dynamic weights
Expand Down Expand Up @@ -634,7 +636,9 @@ TEST_F(QnnCPUBackendTests, ConvTranspose1Df32_StaticWeights_DefaultBias) {
}

// Test 1D ConvTranspose with dynamic weights (implemented in QNN EP as 2D convolution with height of 1).
TEST_F(QnnCPUBackendTests, ConvTranspose1Df32_DynamicWeights_DefaultBias) {
// 2.31 Exception from qnn_interface.graphAddNode
// unknown file: error: SEH exception with code 0xc0000005 thrown in the test body
TEST_F(QnnCPUBackendTests, DISABLED_ConvTranspose1Df32_DynamicWeights_DefaultBias) {
std::vector<float> input_data = {0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f};
RunCPUConvOpTest("ConvTranspose",
TestInputDef<float>({1, 2, 4}, false, input_data), // Dynamic input
Expand Down Expand Up @@ -1137,11 +1141,7 @@ TEST_F(QnnHTPBackendTests, Conv_PerChannel_UnsupportedAxis) {
// QnnDsp <I> QnnGraph_finalize done. status 0x3ea
// onnxruntime::qnn::QnnModel::FinalizeGraphs] Failed to finalize QNN graph.
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Conv3D_U8S8S32_PerChannel) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_Conv3D_U8S8S32_PerChannel) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {3, 2, 2, 2, 2};
std::vector<int64_t> bias_shape = {3};
Expand Down Expand Up @@ -1207,11 +1207,7 @@ TEST_F(QnnHTPBackendTests, ConvDepthwiseU8S8S32_PerChannel) {
// QnnDsp <I> QnnGraph_finalize done. status 0x3ea
// onnxruntime::qnn::QnnModel::FinalizeGraphs] Failed to finalize QNN graph.
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Conv3D_U8S8S32_PerChannel2) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_Conv3D_U8S8S32_PerChannel2) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {2, 1, 2, 2, 2};
std::vector<int64_t> bias_shape = {2};
Expand Down Expand Up @@ -1297,11 +1293,7 @@ TEST_F(QnnHTPBackendTests, ConvTranspose_PerChannel_UnsupportedAxis) {
// ConvTranspose3D per-channel
// Disable it for 2.21 since it failed, re-enabled it for 2.22
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, ConvTranspose3D_U8S8S32_PerChannel) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_ConvTranspose3D_U8S8S32_PerChannel) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {2, 3, 2, 2, 2};
std::vector<int64_t> bias_shape = {3};
Expand Down Expand Up @@ -1366,11 +1358,7 @@ TEST_F(QnnHTPBackendTests, ConvU16S8S32_PerChannel) {
// QnnDsp <I> QnnGraph_finalize done. status 0x3ea
// onnxruntime::qnn::QnnModel::FinalizeGraphs] Failed to finalize QNN graph.
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Conv3D_U16S8S32_PerChannel) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_Conv3D_U16S8S32_PerChannel) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {3, 2, 2, 2, 2};
std::vector<int64_t> bias_shape = {3};
Expand Down Expand Up @@ -1427,11 +1415,7 @@ TEST_F(QnnHTPBackendTests, ConvTransposeU16S8S32_PerChannel) {

// Disable it for 2.21, re-enable it for 2.22
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, ConvTranspose3D_U16S8S32_PerChannel) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_ConvTranspose3D_U16S8S32_PerChannel) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {2, 3, 2, 2, 2};
std::vector<int64_t> bias_shape = {3};
Expand Down Expand Up @@ -1497,11 +1481,7 @@ TEST_F(QnnHTPBackendTests, ConvDepthwiseU16S8S32_PerChannel) {
// QnnDsp <I> QnnGraph_finalize done. status 0x3ea
// onnxruntime::qnn::QnnModel::FinalizeGraphs] Failed to finalize QNN graph.
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Conv3D_U16S8S32_PerChannel2) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_Conv3D_U16S8S32_PerChannel2) {
#endif
std::vector<int64_t> input_shape = {1, 2, 4, 4, 4};
std::vector<int64_t> weight_shape = {2, 1, 2, 2, 2};
std::vector<int64_t> bias_shape = {2};
Expand Down Expand Up @@ -1855,11 +1835,7 @@ TEST_F(QnnHTPBackendTests, ConvTransposeU8U8S32_DynamicWeight_NoBias) {
// Exception thrown at 0x00007FFF9E0128B0 (QnnHtpPrepare.dll) in onnxruntime_test_all.exe:
// 0xC0000005: Access violation reading location 0x7079745F656C706D.
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, ConvTranspose3D_U8U8S32_DynamicWeight_NoBias) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_ConvTranspose3D_U8U8S32_DynamicWeight_NoBias) {
#endif
RunHTPConvOpTest<uint8_t, uint8_t>("ConvTranspose",
TestInputDef<float>({1, 3, 32, 32, 32}, false, -10.0f, 10.0f), // Input
TestInputDef<float>({3, 1, 4, 4, 4}, false, -10.0f, 10.0f), // Weights
Expand Down
4 changes: 0 additions & 4 deletions onnxruntime/test/providers/qnn/gather_op_htp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,7 @@ TEST_F(QnnHTPBackendTests, GatherOp_IndicesDynamicInt32_Axis0) {
//
// Static int32 indices with axis = 1
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, GatherOp_IndicesStaticInt32_Axis1) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_GatherOp_IndicesStaticInt32_Axis1) {
#endif
RunQDQGatherOpTest<uint8_t, int32_t>(TestInputDef<float>({3, 3}, false, {1.0f, 1.2f, 1.9f, 2.3f, 3.4f, 3.9f, 4.5f, 5.7f, 5.9f}),
TestInputDef<int32_t>({1, 2}, true, {0, 2}),
{utils::MakeAttribute("axis", static_cast<int64_t>(1))},
Expand Down
11 changes: 4 additions & 7 deletions onnxruntime/test/providers/qnn/gemm_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,11 @@ TEST_F(QnnHTPBackendTests, Gemm_Broadcast_Bias_DynamicA_StaticB_StaticC) {
// QNN QDQ val: 0 (err 120.73912048339844)
// CPU QDQ val: 120.73889923095703 (err 0.00022125244140625)
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Gemm_Dynamic_A_Static_B_Dynamic_Bias_U16) {
#else
#ifdef __linux__
// Failed on Linux with 2.31
TEST_F(QnnHTPBackendTests, DISABLED_Gemm_Dynamic_A_Static_B_Dynamic_Bias_U16) {
#else
TEST_F(QnnHTPBackendTests, Gemm_Dynamic_A_Static_B_Dynamic_Bias_U16) {
#endif
std::vector<float> input_a_data = GetFloatDataInRange(-10.0f, 10.0f, 6);
std::vector<float> input_b_data = GetFloatDataInRange(-5.0f, 5.0f, 24);
Expand Down Expand Up @@ -374,11 +375,7 @@ TEST_F(QnnHTPBackendTests, Gemm_Dynamic_A_Static_B_Dynamic_Bias_U16Act_U8Weight)
// QNN QDQ val: 77.012794494628906 (err 43.726325988769531)
// CPU QDQ val: 119.85115814208984 (err 0.88796234130859375)
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, Gemm_Dynamic_A_B_Static_Bias) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_Gemm_Dynamic_A_B_Static_Bias) {
#endif
std::vector<float> input_a_data = GetFloatDataInRange(-10.0f, 10.0f, 6);
std::vector<float> input_b_data = GetFloatDataInRange(-5.0f, 5.0f, 24);
std::vector<float> input_c_data = GetFloatDataInRange(-1.0f, 1.0f, 4);
Expand Down
4 changes: 0 additions & 4 deletions onnxruntime/test/providers/qnn/reduce_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,7 @@ TEST_F(QnnCPUBackendTests, ReduceL2Opset13) {
//
// Failed QNN Opvalidation because of 5D input. It runs OK if bypass the op validation
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, ReduceSumOpset11_5D_FP16) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_ReduceSumOpset11_5D_FP16) {
#endif
float fp32_abs_err = 3e-2f;
bool enable_fp16 = true;
RunReduceTest<float>("ReduceSum",
Expand Down
8 changes: 0 additions & 8 deletions onnxruntime/test/providers/qnn/simple_op_htp_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,7 @@ TEST_F(QnnHTPBackendTests, UnaryOp_Ceil) {
// CPU EP qdq model output: [-12.0, -6.99, -1.99, 3.0, 8.0, 11.99]
// QNN EP qdq model output: [-11.0 (WRONG), -7.0, -2.0, 2.99, 8.0, 11.99]
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, UnaryOp_Ceil_U16) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_UnaryOp_Ceil_U16) {
#endif
const std::vector<float> input_data = GetFloatDataInRange(-12.0f, 12.0f, 6);
RunQDQOpTest<uint16_t>("Ceil",
{TestInputDef<float>({1, 2, 3}, false, input_data)},
Expand Down Expand Up @@ -1078,11 +1074,7 @@ TEST_F(QnnHTPBackendTests, GridSample_U16_AlignCorners) {
// QNN QDQ val: 3.2922921180725098 (err 0.069758892059326172)
// CPU QDQ val: 3.3850328922271729 (err 0.022981882095336914)
// Issue fixed in 2.30
#if (QNN_API_VERSION_MAJOR == 2) && (QNN_API_VERSION_MINOR >= 23)
TEST_F(QnnHTPBackendTests, GridSample_BorderPadding) {
#else
TEST_F(QnnHTPBackendTests, DISABLED_GridSample_BorderPadding) {
#endif
RunQDQOpTest<uint8_t>("GridSample",
{TestInputDef<float>({1, 1, 3, 2}, false, -10.0f, 10.0f),
TestInputDef<float>({1, 2, 4, 2}, false, -10.0f, 10.0f)},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

jobs:
- job: Build_QNN_EP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

resources:
repositories:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

jobs:
- job: Build_QNN_EP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parameters:
- name: qnn_sdk_version
type: string
displayName: 'QNN SDK version. Only for QNN packages.'
default: 2.30.0.250109
default: 2.31.0.250130

trigger: none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

- name: build_config
displayName: Build Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ parameters:
- name: qnn_sdk_version
type: string
displayName: 'QNN SDK version. Only for QNN packages.'
default: 2.30.0.250109
default: 2.31.0.250130

stages:
- ${{ if eq(parameters.enable_windows_cpu, true) }}:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters:
- name: QnnSDKVersion
displayName: QNN SDK Version
type: string
default: '2.30.0.250109'
default: '2.31.0.250130'

jobs:
- job: Final_AAR_Testing_Android
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parameters:
- name: QnnSDKVersion
displayName: QNN SDK Version
type: string
default: '2.30.0.250109'
default: '2.31.0.250130'

jobs:
- job: Android_Java_API_AAR_Packaging_${{ parameters.job_name_suffix }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parameters:
- name: QnnSDKVersion
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

stages:
- template: linux-cpu-packaging-pipeline.yml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: QnnSDKVersion
type: string
default: '2.30.0.250109'
default: '2.31.0.250130'

steps:
- script: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: QnnSDKVersion
type: string
default: '2.30.0.250109'
default: '2.31.0.250130'

steps:
- powershell: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

jobs:
- job: Linux_py_qnn_Wheels_x64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
- name: QNN_SDK
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

- name: ENV_SETUP_SCRIPT
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
- name: QNN_SDK
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

- name: ENV_SETUP_SCRIPT
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
- name: QNN_SDK
displayName: QNN SDK Version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

- name: ENV_SETUP_SCRIPT
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
QnnSdk: '2.30.0.250109'
QnnSdk: '2.31.0.250130'
build_config: 'RelWithDebInfo'
IsReleaseBuild: false
DoEsrp: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

jobs:
- job: 'BUILD_QNN_EP'
Expand Down
6 changes: 3 additions & 3 deletions tools/ci_build/github/azure-pipelines/win-qnn-ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ parameters:
- name: QnnSdk
displayName: QNN SDK version
type: string
default: 2.30.0.250109
default: 2.31.0.250130

jobs:
- job: 'BUILD_QNN_EP'
Expand Down Expand Up @@ -102,11 +102,11 @@ jobs:
displayName: 'Run unit tests'

- script: |
.\$(BuildConfig)\onnx_test_runner -j 1 -v -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node
.\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" $(Build.SourcesDirectory)\cmake\external\onnx\onnx\backend\test\data\node
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)'
displayName: 'Run ONNX Tests'

- script: |
.\$(BuildConfig)\onnx_test_runner -j 1 -v -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" C:\data\float32_models
.\$(BuildConfig)\onnx_test_runner -j 1 -e qnn -i "backend_path|$(QnnSDKRootDir)\lib\x86_64-windows-msvc\QnnCpu.dll" C:\data\float32_models
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)'
displayName: 'Run float32 model tests'
Loading