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

ORT 1.19.0 Release: Cherry-Pick Round 2 #21726

Merged
merged 6 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 1 addition & 2 deletions js/react_native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import java.nio.file.Paths
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
Expand Down Expand Up @@ -145,7 +145,6 @@ android {

repositories {
mavenCentral()
jcenter()
google()

def found = false
Expand Down
6 changes: 3 additions & 3 deletions js/react_native/e2e/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.1.1')
Expand All @@ -31,13 +31,13 @@ allprojects {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven {
maven {
// Add Detox as a precompiled native dependency
url("$rootDir/../node_modules/detox/Detox-android")
}

google()
jcenter()
mavenCentral()
maven { url 'https://www.jitpack.io' }
}
}
6 changes: 2 additions & 4 deletions onnxruntime/contrib_ops/cpu/quantization/matmul_nbits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,15 @@ class MatMulNBits final : public OpKernel {
ORT_ENFORCE(nbits_ == 4,
"Only 4b quantization is supported for MatMulNBits op, additional bits support is planned.");
const Tensor* tensor_zero_point = nullptr;
has_zp_input_ = info.TryGetConstantInput(3, &tensor_zero_point);
has_zp_input_ = info.TryGetConstantInput(InputIndex::zero_points, &tensor_zero_point);
#ifdef ORT_NEURAL_SPEED
const Tensor* tensor_B = nullptr;
const Tensor* tensor_scale = nullptr;
const Tensor* tensor_zero_point = nullptr;
bool B_constant = info.TryGetConstantInput(InputIndex::B, &tensor_B);
bool scale_constant = info.TryGetConstantInput(InputIndex::scales, &tensor_scale);
bool zero_point_constant = info.TryGetConstantInput(InputIndex::zero_points, &tensor_zero_point);
is_asym_ = zero_point_arg != nullptr;
all_constant_ = B_constant && scale_constant;
all_constant_ = is_asym_ ? all_constant_ && zero_point_constant : all_constant_;
all_constant_ = is_asym_ ? all_constant_ && has_zp_input_ : all_constant_;
#endif
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ stages:
- stage: Python_Packaging_Windows_x64_QNN
dependsOn: []
jobs:
- template: py-win-x64-qnn.yml
- template: py-win-arm64ec-qnn.yml
parameters:
MACHINE_POOL: 'Onnxruntime-QNNEP-Windows-2022-CPU'
QNN_SDK: ${{ parameters.qnn_sdk_version }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
parameters:

- name: MACHINE_POOL
type: string
default: 'Onnxruntime-QNNEP-Windows-2022-CPU'

- name: QNN_SDK
displayName: QNN SDK Version
type: string
default: 2.24.0.240626

- name: ENV_SETUP_SCRIPT
type: string
default: ''

- name: BUILD_PY_PARAMETERS
displayName: >
Extra parameters to pass to build.py. Don't put newlines in here.
type: string
default: ''

jobs:
- job: Win_py_x64_qnn_Wheels
timeoutInMinutes: 210
workspace:
clean: all
pool:
name: ${{ parameters.MACHINE_POOL }}
strategy:
matrix:
Python38_x64:
PythonVersion: '3.8'
Python39_x64:
PythonVersion: '3.9'
Python310_x64:
PythonVersion: '3.10'
Python311_x64:
PythonVersion: '3.11'
Python312_x64:
PythonVersion: '3.12'
variables:
GRADLE_OPTS: '-Dorg.gradle.daemon=false'
VSGenerator: 'Visual Studio 17 2022'
steps:
- checkout: self
clean: true
submodules: recursive

- template: telemetry-steps.yml

- task: UsePythonVersion@0
inputs:
versionSpec: $(PythonVersion)
addToPath: true
architecture: 'x64'

- task: onebranch.pipeline.tsaoptions@1
displayName: 'OneBranch TSAOptions'
inputs:
tsaConfigFilePath: '$(Build.SourcesDirectory)\.config\tsaoptions.json'
appendSourceBranchName: false

- template: download-deps.yml

- task: PythonScript@0
displayName: 'Update deps.txt'
inputs:
scriptPath: $(Build.SourcesDirectory)/tools/ci_build/replace_urls_in_deps.py
arguments: --new_dir $(Build.BinariesDirectory)/deps
workingDirectory: $(Build.BinariesDirectory)

- task: PowerShell@2
displayName: 'Install ONNX'
inputs:
filePath: '$(Build.SourcesDirectory)/tools/ci_build/github/windows/install_third_party_deps.ps1'
workingDirectory: '$(Build.BinariesDirectory)'
arguments: -cpu_arch x64 -install_prefix $(Build.BinariesDirectory)\RelWithDebInfo\installed -build_config RelWithDebInfo

- template: set-nightly-build-option-variable-step.yml

- template: jobs/download_win_qnn_sdk.yml
parameters:
QnnSDKVersion: ${{ parameters.QNN_SDK }}

- task: PythonScript@0
displayName: 'Generate cmake config'
inputs:
scriptPath: '$(Build.SourcesDirectory)\tools\ci_build\build.py'
arguments: >
--config RelWithDebInfo
--build_dir $(Build.BinariesDirectory)
--skip_submodule_sync
--cmake_generator "$(VSGenerator)"
--use_qnn
--qnn_home $(QnnSDKRootDir)
--enable_pybind
--parallel --update --arm64ec
$(TelemetryOption) ${{ parameters.BUILD_PY_PARAMETERS }}
workingDirectory: '$(Build.BinariesDirectory)'

- task: VSBuild@1
displayName: 'Build'
inputs:
solution: '$(Build.BinariesDirectory)\RelWithDebInfo\onnxruntime.sln'
platform: 'arm64ec'
configuration: RelWithDebInfo
msbuildArchitecture: 'x64'
maximumCpuCount: true
logProjectEvents: true
workingFolder: '$(Build.BinariesDirectory)\RelWithDebInfo'
createLogFile: true

# Esrp signing
- template: win-esrp-dll.yml
parameters:
FolderPath: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\onnxruntime\capi'
DisplayName: 'ESRP - Sign Native dlls'
DoEsrp: true
Pattern: '*.pyd'

- task: PythonScript@0
displayName: 'Build wheel'
inputs:
scriptPath: '$(Build.SourcesDirectory)\setup.py'
arguments: 'bdist_wheel $(NightlyBuildOption) --wheel_name_suffix=qnn'
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'

- task: CopyFiles@2
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
inputs:
SourceFolder: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\dist'
Contents: '*.whl'
TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: ONNXRuntime python wheel'
inputs:
ArtifactName: onnxruntime_qnn

- script: |
7z x *.whl
workingDirectory: '$(Build.ArtifactStagingDirectory)'
displayName: 'unzip the package'

- task: CredScan@3
displayName: 'Run CredScan'
inputs:
debugMode: false
continueOnError: true

- task: BinSkim@4
displayName: 'Run BinSkim'
inputs:
AnalyzeTargetGlob: '+:file|$(Build.ArtifactStagingDirectory)\**\*.dll'

- task: TSAUpload@2
displayName: 'TSA upload'
condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
inputs:
GdnPublishTsaOnboard: false
GdnPublishTsaConfigFile: '$(Build.sourcesDirectory)\.gdn\.gdntsa'

- template: component-governance-component-detection-steps.yml
parameters:
condition: 'succeeded'
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rsa==4.9
tensorboard==2.13.0
h5py
wget
pytorch-lightning
pytorch-lightning==2.3.3
deepspeed==0.9.0
fairscale==0.4.6
parameterized>=0.8.1
Expand Down
Loading