mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-12 00:59:23 +00:00
### Description <!-- Describe your changes. --> Second round cherry pick, total 13 PRs, as below. Please check here for [Here](https://github.com/microsoft/onnxruntime/issues?q=label%3Arelease%3A1.14+sort%3Aupdated-asc+is%3Aclosed+label%3Atriage%3Aapproved) for the total list. <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 15"> <link id=Main-File rel=Main-File href="file:///C:/Users/ruiren/AppData/Local/Temp/msohtmlclip1/01/clip.htm"> <link rel=File-List href="file:///C:/Users/ruiren/AppData/Local/Temp/msohtmlclip1/01/clip_filelist.xml"> <style> <!--table {mso-displayed-decimal-separator:"\."; mso-displayed-thousand-separator:"\,";} @page {margin:.75in .7in .75in .7in; mso-header-margin:.3in; mso-footer-margin:.3in;} tr {mso-height-source:auto;} col {mso-width-source:auto;} br {mso-data-placement:same-cell;} td {padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:black; font-size:11.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:Calibri, sans-serif; mso-font-charset:0; mso-number-format:General; text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;} .xl65 {text-align:center;} .xl66 {color:windowtext; text-align:center; border:.5pt solid windowtext;} .xl67 {text-align:center; border:.5pt solid windowtext;} .xl68 {text-align:center; border:.5pt solid windowtext; background:white; mso-pattern:black none;} --> </style> </head> <body link="#0563C1" vlink="#954F72"> Date | PR | # | Commit # | Short # -- | -- | -- | -- | -- 1 | Fix unused variable for CUDA EP builds with USE_FLASH_ATTENTION off | 14404 |85d7e9c596|85d7e9c2 | UNet fusion and fp16 conversion for stable diffusion | 14248 |a95fcb4345|a95fcb43 | upgrade protobuf to 3.20.2 and onnx to 1.13 | 14279 |80f807c03d|80f807c4 | Include python training apis when enable_training is enabled | 14485 |d06ad9462b|d06ad945 | Including support for Deepspeed 0.8.0 | 14506 |6fa4555a06|6fa45556 | change deepspeed version in warning from 0.7.3 to 0.8.0 | 14527 |3d388a1aea|3d388a17 | Do not fuse DQ+Node+Q if DQ produces graph output | 14509 |d9e675a2af|d9e675a8 | upgrade EsrpCodeSigning from v1 to v2 | 14531 |0578eeff91|0578eef9 | Fix python packaging pipeline | 14533 |7954976e0a|795497610 | Specify deps in deps.txt and manifest | 14530 |01cafe89f0|01cafe811 | Fix Gather to Split optimizer | 14478 |0bcca7ad45|0bcca7a12 | Stable Diffusion CUDA Optimizations | 14428 |a6c5ba0185|a6c5ba013 | Fix sharing scalar bug | 14544 |c6c11039d7|c6c1103</body> </html> ### 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. --> Second round cherry-pick for ORT 1.14.0 release. --------- Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com> Co-authored-by: Tianlei Wu <tlwu@microsoft.com> Co-authored-by: Yi Zhang <zhanyi@microsoft.com> Co-authored-by: Baiju Meswani <bmeswani@microsoft.com> Co-authored-by: Abhishek Jindal <abjindal@microsoft.com> Co-authored-by: Yufeng Li <liyufeng1987@gmail.com> Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Co-authored-by: RandySheriffH <48490400+RandySheriffH@users.noreply.github.com> Co-authored-by: Randy Shuai <rashuai@microsoft.com> Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com> Co-authored-by: pengwa <pengwa@microsoft.com>
82 lines
2.8 KiB
PowerShell
82 lines
2.8 KiB
PowerShell
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
# This script depends on python.exe, cmake.exe and Visual C++ spectre-mitigated libs.
|
|
# Please setup AGENT_TEMPDIRECTORY env variable before running this script
|
|
|
|
param (
|
|
[string]$cpu_arch = "x64",
|
|
[string]$build_config = "RelWithDebInfo",
|
|
[string]$install_prefix = ".",
|
|
[switch]$use_cache
|
|
)
|
|
|
|
. "$PSScriptRoot\helpers.ps1"
|
|
|
|
$ort_src_root = (Get-Item $PSScriptRoot).parent.parent.parent.parent.FullName
|
|
|
|
Write-Host "ONNX Runtime src root: $ort_src_root"
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$Env:Path = "$install_prefix\bin;" + $env:Path
|
|
$Env:MSBUILDDISABLENODEREUSE=1
|
|
|
|
New-Item -Path "$install_prefix" -ItemType Directory -Force
|
|
|
|
# Setup compile flags
|
|
$compile_flags = '/MP /guard:cf /Qspectre /DWIN32 /D_WINDOWS /DWINVER=0x0601 /D_WIN32_WINNT=0x0601 /DNTDDI_VERSION=0x06010000 /W3 '
|
|
$linker_flags=@('/guard:cf')
|
|
|
|
if ($use_cache) {
|
|
$debug_info_format = "/Z7"
|
|
}
|
|
else {
|
|
$debug_info_format = "/Zi"
|
|
}
|
|
|
|
if($build_config -eq 'Release'){
|
|
$compile_flags += "/O2", "/Ob2", "/DNDEBUG", "/Gw", "/GL"
|
|
} elseif($build_config -eq 'RelWithDebInfo'){
|
|
$compile_flags += "$debug_info_format", "/O2", "/Ob1", "/DNDEBUG", "/Gw", "/GL"
|
|
} elseif($build_config -eq 'Debug'){
|
|
$compile_flags += "$debug_info_format", "/Ob0", "/Od", "/RTC1"
|
|
} elseif($build_config -eq 'MinSizeRel'){
|
|
$compile_flags += "/O1", "/Ob1", "/DNDEBUG", "/Gw", "/GL"
|
|
}
|
|
Write-Host $compile_flags
|
|
# cmake args that applies to every 3rd-party library
|
|
[string[]]$cmake_extra_args="-DCMAKE_CXX_STANDARD=17 `"-DCMAKE_CXX_FLAGS=$compile_flags /EHsc`" ", "`"-DCMAKE_C_FLAGS=$compile_flags`"", "--compile-no-warning-as-error", "--fresh", "-Wno-dev"
|
|
if($cpu_arch -eq 'x86'){
|
|
$cmake_extra_args += "-A", "Win32", "-T", "host=x64"
|
|
$linker_flags += '/machine:x86'
|
|
} elseif($cpu_arch -eq 'x64') {
|
|
$linker_flags += '/machine:x64'
|
|
} else {
|
|
throw "$cpu_arch is not supported"
|
|
}
|
|
|
|
if ($use_cache) {
|
|
if ($build_config -eq 'RelWithDebInfo') {
|
|
$cmake_extra_args += "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=`"/MD /Z7 /O2 /Ob1 /DNDEBUG`""
|
|
}
|
|
elseif ($build_config -eq 'Debug') {
|
|
$cmake_extra_args += "-DCMAKE_CXX_FLAGS_DEBUG=`"/MDd /Z7 /Ob0 /Od /RTC1`""
|
|
}
|
|
}
|
|
|
|
$cmake_extra_args += "-DCMAKE_EXE_LINKER_FLAGS=`"$linker_flags`""
|
|
|
|
# Find the full path of cmake.exe
|
|
$cmake_command = (Get-Command -CommandType Application cmake)[0]
|
|
$cmake_path = $cmake_command.Path
|
|
|
|
Install-Pybind -cmake_path $cmake_path -src_root $ort_src_root -build_config $build_config -cmake_extra_args $cmake_extra_args
|
|
|
|
Install-Protobuf -cmake_path $cmake_path -src_root $ort_src_root -build_config $build_config -cmake_extra_args $cmake_extra_args
|
|
|
|
# TODO: parse it from deps.txt
|
|
$protobuf_version="3.20.2"
|
|
|
|
# ONNX doesn't allow us to specify CMake's path
|
|
Install-ONNX -build_config $build_config -src_root $ort_src_root -protobuf_version $protobuf_version
|