Skip to content

Commit

Permalink
ORT 1.19.0 Release: Cherry-Pick Round 2 (#21726)
Browse files Browse the repository at this point in the history
### Description
<!-- Describe your changes. -->

PRs marked for cherry-pick & bug fixes.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

ORT 1.19.0 Release Preparation

---------

Signed-off-by: Liqun Fu <[email protected]>
Co-authored-by: George Wu <[email protected]>
Co-authored-by: liqun Fu <[email protected]>
Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Yi Zhang <[email protected]>
  • Loading branch information
5 people authored Aug 14, 2024
1 parent ccf6a28 commit 26250ae
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 14 deletions.
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 @@ -282,6 +282,7 @@ stages:
- stage: Llama2_7B_ONNX
dependsOn:
- Build_Onnxruntime_Cuda
condition: and (succeeded(), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/rel-')))
jobs:
- job: Llama2_7B_ONNX
timeoutInMinutes: 120
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
RunInjectedPipeline: 'true'
InjectedPipeline: 'orttraining-linux-gpu-test-ci-pipeline.yml'
DockerImageTag: 'onnxruntime_orttraining_ortmodule_tests_image'
TimeoutInMinutes: 140
TimeoutInMinutes: 150
# Enable unreleased onnx opsets in CI builds
# This facilitates testing the implementation for the new opsets
AllowReleasedOpsetOnly: '0'
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stages:
torch_version: '2.0.0'
opset_version: '17'
cuda_version: '11.8'
cmake_cuda_architectures: 60;61;70;75;80;86
cmake_cuda_architectures: 70;75;80;86
docker_file: Dockerfile.manylinux2_28_training_cuda11_8
agent_pool: Onnxruntime-Linux-GPU
upload_wheel: 'yes'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ stages:
torch_version: '2.1.0'
opset_version: '17'
cuda_version: '12.2'
cmake_cuda_architectures: 70;75;80;86;90
cmake_cuda_architectures: 80;86;90
docker_file: Dockerfile.manylinux2_28_training_cuda12_2
agent_pool: Onnxruntime-Linux-GPU
upload_wheel: 'yes'
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
165 changes: 165 additions & 0 deletions tools/ci_build/github/azure-pipelines/templates/py-win-arm64ec-qnn.yml
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

0 comments on commit 26250ae

Please sign in to comment.