mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
### Description - Update pipelines to use QNN SDK 2.24 by default - Update QNN_Nuget_Windows pipeline to build csharp solution without mobile projects (fixes errors). - Implement workaround for QNN 2.24 validation bug for LayerNorm ops without an explicit bias input. - Enable Relu unit test, which now passes due to the fact Relu is no longer fused into QuantizeLinear for QNN EP. - Fix bug where a negative quantization axis is not properly normalized for per-channel int4 conv. ### Motivation and Context Update QNN SDk.
103 lines
4 KiB
YAML
103 lines
4 KiB
YAML
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
pr:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
#### end trigger ####
|
|
|
|
parameters:
|
|
|
|
- name: QnnSdk
|
|
displayName: QNN SDK version
|
|
type: string
|
|
default: 2.24.0.240626
|
|
|
|
jobs:
|
|
- job: 'build'
|
|
pool: 'Onnxruntime-QNNEP-Windows-2022-CPU'
|
|
variables:
|
|
MsbuildArguments: '-detailedsummary -maxcpucount -consoleloggerparameters:PerformanceSummary'
|
|
OnnxRuntimeBuildDirectory: '$(Build.BinariesDirectory)'
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
buildArch: x64
|
|
setVcvars: true
|
|
BuildConfig: 'RelWithDebInfo'
|
|
ALLOW_RELEASED_ONNX_OPSET_ONLY: '1'
|
|
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
|
|
timeoutInMinutes: 120
|
|
workspace:
|
|
clean: all
|
|
steps:
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: '3.8'
|
|
addToPath: true
|
|
architecture: $(buildArch)
|
|
|
|
- template: templates/jobs/download_win_qnn_sdk.yml
|
|
parameters:
|
|
QnnSDKVersion: ${{ parameters.QnnSdk }}
|
|
|
|
# TODO: Remove --compile_no_warning_as_error once we update from MSVC Runtime library version 14.32 or we
|
|
# fix/silence the following warning from the <variant> STL header. This warning halts compilation due to
|
|
# the /external:templates- option, which allows warnings from external libs for template instantiations.
|
|
# Warning is not reported on version 14.35.32215 of the Runtime library.
|
|
#
|
|
# [warning]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.32.31326\include\variant(1586,9)
|
|
# : Warning C4189: '_Size': local variable is initialized but not referenced
|
|
# (compiling source file D:\a\_work\1\s\onnxruntime\core\session\IOBinding.cc)
|
|
#
|
|
# MSVC\14.32.31326\include\variant(1633): message : see reference to function template instantiation
|
|
# '_Ret &std::_Visit_strategy<1>::_Visit2<_Ret,_ListOfIndexVectors,_Callable,const
|
|
# std::variant<onnxruntime::OpSchemaKernelTypeStrResolver,onnxruntime::KernelTypeStrResolver>&>(size_t,_Callable &&,
|
|
# const std::variant<onnxruntime::OpSchemaKernelTypeStrResolver,onnxruntime::KernelTypeStrResolver> &)'
|
|
- template: templates/jobs/win-ci-build-steps.yml
|
|
parameters:
|
|
WithCache: True
|
|
Today: $(TODAY)
|
|
AdditionalKey: "win-qnn | $(BuildConfig)"
|
|
BuildPyArguments: '--config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --compile_no_warning_as_error --update --cmake_generator "Visual Studio 17 2022" --use_qnn --qnn_home $(QnnSDKRootDir) --parallel --use_binskim_compliant_compile_flags'
|
|
MsbuildArguments: $(MsbuildArguments)
|
|
BuildArch: $(buildArch)
|
|
Platform: 'x64'
|
|
BuildConfig: $(BuildConfig)
|
|
|
|
- powershell: |
|
|
python $(Build.SourcesDirectory)\tools\ci_build\build.py --config $(BuildConfig) --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --test --cmake_generator "Visual Studio 17 2022" --enable_onnx_tests
|
|
workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)\$(BuildConfig)'
|
|
displayName: 'Run unit tests'
|
|
|
|
# Comment out QnnCpu tests because QNN SDK 2.22 CPU backend crashes when executing MatMuls.
|
|
# Does not happen with HTP backend.
|
|
# - 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
|
|
# 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
|
|
# workingDirectory: '$(Build.BinariesDirectory)\$(BuildConfig)'
|
|
# displayName: 'Run float32 model tests'
|