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
4 changes: 2 additions & 2 deletions .github/workflows/windows_qnn_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ jobs:
- name: Download QNN SDK
working-directory: ${{ runner.temp }}
run: |
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/qnnsdk/qnn-v2.41.0.251128 .
azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/qnnsdk/qnn-v2.42.0.251225 .
dir
shell: pwsh

- name: Set QNN_SDK_ROOT environment variable
shell: pwsh
run: |
$qnn_sdk_path = Join-Path $env:RUNNER_TEMP "qnn-v2.41.0.251128"
$qnn_sdk_path = Join-Path $env:RUNNER_TEMP "qnn-v2.42.0.251225"
echo "QNN_SDK_ROOT=$qnn_sdk_path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "QNN SDK Root: $qnn_sdk_path"
dir $qnn_sdk_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ class LayerNormOpBuilder : public BaseOpBuilder {
Status LayerNormOpBuilder::IsOpSupported(QnnModelWrapper& qnn_model_wrapper,
const NodeUnit& node_unit,
const logging::Logger& logger) const {
bool is_cpu_backend = IsCpuBackend(qnn_model_wrapper.GetQnnBackendType());

// Disable LayerNorm for CPU backend when API version > 2.31
// This catches SDK version 2.42 which has API version 2.32
if (is_cpu_backend && (QNN_API_VERSION_MAJOR == 2 && QNN_API_VERSION_MINOR > 31)) {
return ORT_MAKE_STATUS(ONNXRUNTIME, NOT_IMPLEMENTED,
"LayerNorm is not supported on QNN CPU backend with QNN SDK version > 2.41 due to accuracy issues");
}

// Also check output type is float for CPU.
const auto& outputs = node_unit.Outputs();
ORT_RETURN_IF(outputs.size() > 1, "QNN LayerNorm only support 1 output.");
Expand Down
12 changes: 7 additions & 5 deletions onnxruntime/test/providers/qnn/layer_norm_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,35 +32,37 @@ static void RunLayerNormCpuTest(const TestInputDef<float>& input_def,
expected_ep_assignment);
}

TEST_F(QnnCPUBackendTests, LayerNorm) {
// Disabled all QNN CPU LayerNorm tests due to bug in 2.42 SDK

TEST_F(QnnCPUBackendTests, DISABLED_LayerNorm) {
RunLayerNormCpuTest(TestInputDef<float>({2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
TestInputDef<float>({2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
{utils::MakeAttribute("axis", static_cast<int64_t>(0))},
ExpectedEPNodeAssignment::All);
}

TEST_F(QnnCPUBackendTests, LayerNorm1D_Axis0) {
TEST_F(QnnCPUBackendTests, DISABLED_LayerNorm1D_Axis0) {
RunLayerNormCpuTest(TestInputDef<float>({1, 2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
TestInputDef<float>({1, 2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
{utils::MakeAttribute("axis", static_cast<int64_t>(0))},
ExpectedEPNodeAssignment::All);
}

TEST_F(QnnCPUBackendTests, LayerNorm1D_AxisLast) {
TEST_F(QnnCPUBackendTests, DISABLED_LayerNorm1D_AxisLast) {
RunLayerNormCpuTest(TestInputDef<float>({1, 2, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 6)),
TestInputDef<float>({3}, false, GetFloatDataInRange(0.0f, 10.0f, 3)),
{utils::MakeAttribute("axis", static_cast<int64_t>(-1))},
ExpectedEPNodeAssignment::All);
}

TEST_F(QnnCPUBackendTests, LayerNorm2D) {
TEST_F(QnnCPUBackendTests, DISABLED_LayerNorm2D) {
RunLayerNormCpuTest(TestInputDef<float>({1, 2, 3, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 18)),
TestInputDef<float>({1, 2, 3, 3}, false, GetFloatDataInRange(0.0f, 10.0f, 18)),
{utils::MakeAttribute("axis", static_cast<int64_t>(0))},
ExpectedEPNodeAssignment::All);
}

TEST_F(QnnCPUBackendTests, LayerNorm3D) {
TEST_F(QnnCPUBackendTests, DISABLED_LayerNorm3D) {
RunLayerNormCpuTest(TestInputDef<float>({1, 2, 3, 3, 4}, false, GetFloatDataInRange(0.0f, 10.0f, 72)),
TestInputDef<float>({1, 2, 3, 3, 4}, false, GetFloatDataInRange(0.0f, 10.0f, 72)),
{utils::MakeAttribute("axis", static_cast<int64_t>(0))},
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.41.0.251128
default: 2.42.0.251225

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

- name: CudaVersion
displayName: CUDA version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ stages:
artifactName: 'onnxruntime-android-qnn-aar'
packageName: 'onnxruntime-android-qnn'
#TODO: get this information from the setup stage
QnnSDKVersion: '2.41.0.251128'
QnnSDKVersion: '2.42.0.251225'

- template: nuget/templates/test_win.yml
parameters:
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.41.0.251128
default: 2.42.0.251225

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.41.0.251128
default: 2.42.0.251225

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.41.0.251128
default: 2.42.0.251225

- 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.41.0.251128
default: 2.42.0.251225

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

- name: enableWebGpu
displayName: Enable WebGPU test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ parameters:
- name: QnnSDKVersion
displayName: QNN SDK Version
type: string
default: '2.41.0.251128'
default: '2.42.0.251225'

- name: is1ES
displayName: Is 1ES pipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parameters:
- name: QnnSDKVersion
displayName: QNN SDK Version
type: string
default: 2.41.0.251128
default: 2.42.0.251225

- name: is1ES
displayName: Is 1ES pipeline
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
- name: QnnSDKVersion
type: string
default: '2.41.0.251128'
default: '2.42.0.251225'

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.41.0.251128'
default: '2.42.0.251225'

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

steps:
- bash: |
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.41.0.251128
default: 2.42.0.251225

- name: is1ES
displayName: 'Whether the pipeline is running in 1ES'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
- name: QNN_SDK
displayName: QNN SDK Version
type: string
default: 2.41.0.251128
default: 2.42.0.251225

- 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.41.0.251128
default: 2.42.0.251225

- 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.41.0.251128
default: 2.42.0.251225

- 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.41.0.251128'
QnnSdk: '2.42.0.251225'
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.41.0.251128
default: 2.42.0.251225

jobs:
- job: 'BUILD_QNN_EP'
Expand Down
Loading