mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-22 19:23:30 +00:00
### Description Merge main to WindowsAI ### 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. --> --------- Signed-off-by: Nash <george.nash@intel.com> Signed-off-by: Yiming Hu <yiming.hu@amd.com> Signed-off-by: Liqun Fu <liqfu@microsoft.com> Co-authored-by: Kaz Nishimura <kazssym@linuxfront.com> Co-authored-by: Tianlei Wu <tlwu@microsoft.com> Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com> Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Co-authored-by: Changming Sun <chasun@microsoft.com> Co-authored-by: zesongw <zesong.wang@intel.com> Co-authored-by: Yi Zhang <zhanyi@microsoft.com> Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com> Co-authored-by: Yifan Li <109183385+yf711@users.noreply.github.com> Co-authored-by: simonjub <78098752+simonjub@users.noreply.github.com> Co-authored-by: PeixuanZuo <94887879+PeixuanZuo@users.noreply.github.com> Co-authored-by: Adrian Lizarraga <adlizarraga@microsoft.com> Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com> Co-authored-by: Arthur Islamov <arthur@islamov.ai> Co-authored-by: Jambay Kinley <jambaykinley@microsoft.com> Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com> Co-authored-by: Wei-Sheng Chin <wschin@outlook.com> Co-authored-by: Bowen Bao <bowbao@microsoft.com> Co-authored-by: Hariharan Seshadri <shariharan91@gmail.com> Co-authored-by: Numfor Tiapo <numsmt2@gmail.com> Co-authored-by: Vincent Wang <wangwchpku@outlook.com> Co-authored-by: Pranav Sharma <prs@microsoft.com> Co-authored-by: George Nash <george.nash@intel.com> Co-authored-by: Abhishek Jindal <abjindal@microsoft.com> Co-authored-by: pengwa <pengwa@microsoft.com> Co-authored-by: Yiming Hu <woinck@users.noreply.github.com> Co-authored-by: Jiajia Qin <jiajia.qin@intel.com> Co-authored-by: Lukas Berbuer <36054362+lukasberbuer@users.noreply.github.com> Co-authored-by: Wanming Lin <wanming.lin@intel.com> Co-authored-by: Xavier Dupré <xadupre@users.noreply.github.com> Co-authored-by: aimilefth <60664743+aimilefth@users.noreply.github.com> Co-authored-by: Baiju Meswani <bmeswani@microsoft.com> Co-authored-by: Adam Pocock <adam.pocock@oracle.com> Co-authored-by: Chi Lo <54722500+chilo-ms@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: Vadym Stupakov <vadim.stupakov@gmail.com> Co-authored-by: Jian Chen <cjian@microsoft.com> Co-authored-by: Brian Lambert <98757707+brian-pieces@users.noreply.github.com> Co-authored-by: Nicolò Lucchesi <nicolo.lucchesi@gmail.com> Co-authored-by: liqun Fu <liqfu@microsoft.com> Co-authored-by: trajep <trajepl@gmail.com> Co-authored-by: Scott McKay <skottmckay@gmail.com> Co-authored-by: Mustafa Ateş Uzun <mustafauzun0@gmail.com> Co-authored-by: MistEO <mistereo@hotmail.com> Co-authored-by: satyajandhyala <satya.k.jandhyala@gmail.com> Co-authored-by: shaahji <96227573+shaahji@users.noreply.github.com> Co-authored-by: Rachel Guo <35738743+YUNQIUGUO@users.noreply.github.com> Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net> Co-authored-by: Caroline Zhu <wolfivyaura@gmail.com> Co-authored-by: Caroline Zhu <carolinezhu@microsoft.com> Co-authored-by: Guenther Schmuelling <guschmue@microsoft.com> Co-authored-by: xhcao <xinghua.cao@intel.com> Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> Co-authored-by: Xu Xing <xing.xu@intel.com> Co-authored-by: Hector Li <hecli@microsoft.com> Co-authored-by: Ye Wang <52801275+wangyems@users.noreply.github.com> Co-authored-by: Your Name <you@example.com> Co-authored-by: Benedikt Hilmes <benedikt.hilmes@rwth-aachen.de> Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local> Co-authored-by: George Wu <jywu@microsoft.com> Co-authored-by: JiCheng <wejoncy@163.com> Co-authored-by: Sheil Kumar <smk2007@gmail.com> Co-authored-by: Sheil Kumar <sheilk@microsoft.com> Co-authored-by: cloudhan <guangyunhan@microsoft.com> Co-authored-by: kyoshisuki <143475866+kyoshisuki@users.noreply.github.com> Co-authored-by: aciddelgado <139922440+aciddelgado@users.noreply.github.com> Co-authored-by: tlwu@microsoft.com <tlwu@a100.crj0ad2y1kku1j4yxl4sj10o4e.gx.internal.cloudapp.net> Co-authored-by: Maximilian Müller <44298237+gedoensmax@users.noreply.github.com> Co-authored-by: Tang, Cheng <souptc@gmail.com> Co-authored-by: Cheng Tang <chenta@microsoft.com@orttrainingdev9.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net> Co-authored-by: Cheng Tang <chenta@microsoft.com> Co-authored-by: Jeff Daily <jeff.daily@amd.com> Co-authored-by: cloudhan <cloudhan@outlook.com> Co-authored-by: Yufeng Li <liyufeng1987@gmail.com> Co-authored-by: Zhang Lei <zhang.huanning@hotmail.com> Co-authored-by: Dwayne Robinson <fdwr@hotmail.com> Co-authored-by: Zhipeng Han <zhipeng.han@outlook.com> Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Patrice Vignola <vignola.patrice@gmail.com> Co-authored-by: kunal-vaishnavi <115581922+kunal-vaishnavi@users.noreply.github.com> Co-authored-by: snadampal <87143774+snadampal@users.noreply.github.com> Co-authored-by: Sumit Agarwal <sumitagarwal330@gmail.com> Co-authored-by: Ashwini Khade <askhade@microsoft.com> Co-authored-by: Yang Gu <yang.gu@intel.com> Co-authored-by: Cheng Tang <chenta@a100.crj0ad2y1kku1j4yxl4sj10o4e.gx.internal.cloudapp.net> Co-authored-by: mindest <30493312+mindest@users.noreply.github.com> Co-authored-by: Scott McKay <Scott.McKay@microsoft.com> Co-authored-by: Xavier Dupre <xadupre@microsoft.com@orttrainingdev9.d32nl1ml4oruzj4qz3bqlggovf.px.internal.cloudapp.net> Co-authored-by: guyang3532 <62738430+guyang3532@users.noreply.github.com> Co-authored-by: Carson M <carson@pyke.io> Co-authored-by: sophies927 <107952697+sophies927@users.noreply.github.com>
173 lines
8 KiB
Diff
173 lines
8 KiB
Diff
diff --git a/build-cpython.sh b/build-cpython.sh
|
|
index eea89e2..79c74d8 100755
|
|
--- a/build-cpython.sh
|
|
+++ b/build-cpython.sh
|
|
@@ -49,7 +49,7 @@ fi
|
|
CFLAGS_NODIST="${MANYLINUX_CFLAGS} ${MANYLINUX_CPPFLAGS} ${CFLAGS_EXTRA}" \
|
|
LDFLAGS_NODIST="${MANYLINUX_LDFLAGS}" \
|
|
--prefix=${PREFIX} --disable-shared --with-ensurepip=no > /dev/null
|
|
-make > /dev/null
|
|
+make -j$(nproc) > /dev/null
|
|
make install > /dev/null
|
|
popd
|
|
rm -rf Python-${CPYTHON_VERSION} Python-${CPYTHON_VERSION}.tgz Python-${CPYTHON_VERSION}.tgz.asc
|
|
diff --git a/build-git.sh b/build-git.sh
|
|
index 9c0b02d..2e2919c 100755
|
|
--- a/build-git.sh
|
|
+++ b/build-git.sh
|
|
@@ -27,7 +27,7 @@ fetch_source ${GIT_ROOT}.tar.gz ${GIT_DOWNLOAD_URL}
|
|
check_sha256sum ${GIT_ROOT}.tar.gz ${GIT_HASH}
|
|
tar -xzf ${GIT_ROOT}.tar.gz
|
|
pushd ${GIT_ROOT}
|
|
-make install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}"
|
|
+make -j$(nproc) install prefix=/usr/local NO_GETTEXT=1 NO_TCLTK=1 DESTDIR=/manylinux-rootfs CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" CXXFLAGS="${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}"
|
|
popd
|
|
rm -rf ${GIT_ROOT} ${GIT_ROOT}.tar.gz
|
|
|
|
diff --git a/build-openssl.sh b/build-openssl.sh
|
|
index 668deb6..5f3f5d5 100755
|
|
--- a/build-openssl.sh
|
|
+++ b/build-openssl.sh
|
|
@@ -40,7 +40,7 @@ check_sha256sum ${OPENSSL_ROOT}.tar.gz ${OPENSSL_HASH}
|
|
tar -xzf ${OPENSSL_ROOT}.tar.gz
|
|
pushd ${OPENSSL_ROOT}
|
|
./config no-shared --prefix=/usr/local/ssl --openssldir=/usr/local/ssl CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS} -fPIC" CXXFLAGS="${MANYLINUX_CXXFLAGS} -fPIC" LDFLAGS="${MANYLINUX_LDFLAGS} -fPIC" > /dev/null
|
|
-make > /dev/null
|
|
+make -j$(nproc) > /dev/null
|
|
make install_sw > /dev/null
|
|
popd
|
|
rm -rf ${OPENSSL_ROOT} ${OPENSSL_ROOT}.tar.gz
|
|
diff --git a/build_utils.sh b/build_utils.sh
|
|
index 961e34d..55ae11b 100755
|
|
--- a/build_utils.sh
|
|
+++ b/build_utils.sh
|
|
@@ -52,7 +52,7 @@ function check_sha256sum {
|
|
|
|
function do_standard_install {
|
|
./configure "$@" CPPFLAGS="${MANYLINUX_CPPFLAGS}" CFLAGS="${MANYLINUX_CFLAGS}" "CXXFLAGS=${MANYLINUX_CXXFLAGS}" LDFLAGS="${MANYLINUX_LDFLAGS}" > /dev/null
|
|
- make > /dev/null
|
|
+ make -j$(nproc) > /dev/null
|
|
make install > /dev/null
|
|
}
|
|
|
|
diff --git a/finalize.sh b/finalize.sh
|
|
index 621eab9..4cbcf90 100755
|
|
--- a/finalize.sh
|
|
+++ b/finalize.sh
|
|
@@ -86,6 +86,3 @@ clean_pyc /opt/_internal
|
|
rm -rf /root/.cache
|
|
|
|
hardlink -cv /opt/_internal
|
|
-
|
|
-# update system packages
|
|
-LC_ALL=C ${MY_DIR}/update-system-packages.sh
|
|
diff --git a/install-build-packages.sh b/install-build-packages.sh
|
|
index 408bc33..b45ceba 100755
|
|
--- a/install-build-packages.sh
|
|
+++ b/install-build-packages.sh
|
|
@@ -9,12 +9,11 @@ set -exuo pipefail
|
|
# make sure the corresponding library is added to RUNTIME_DEPS if applicable
|
|
|
|
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
|
|
- COMPILE_DEPS="bzip2-devel ncurses-devel readline-devel gdbm-devel libpcap-devel xz-devel openssl openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel libidn-devel curl-devel uuid-devel libffi-devel kernel-headers libdb-devel"
|
|
+ COMPILE_DEPS="bzip2-devel ncurses-devel gdbm-devel xz-devel openssl openssl-devel keyutils-libs-devel krb5-devel libcom_err-devel curl-devel libffi-devel kernel-headers libdb-devel"
|
|
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|
PACKAGE_MANAGER=yum
|
|
else
|
|
PACKAGE_MANAGER=dnf
|
|
- COMPILE_DEPS="${COMPILE_DEPS} tk-devel"
|
|
fi
|
|
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
|
PACKAGE_MANAGER=apk
|
|
diff --git a/install-entrypoint.sh b/install-entrypoint.sh
|
|
index 9ef1e99..ec52833 100755
|
|
--- a/install-entrypoint.sh
|
|
+++ b/install-entrypoint.sh
|
|
@@ -26,3 +26,8 @@ fi
|
|
if [ "${AUDITWHEEL_POLICY}" = "musllinux_1_1" ]; then
|
|
apk add --no-cache bash
|
|
fi
|
|
+
|
|
+if command -v yum 2>&1 ; then
|
|
+ yum install -y yum-plugin-versionlock
|
|
+ yum versionlock cuda* libcudnn* libnccl*
|
|
+fi
|
|
\ No newline at end of file
|
|
diff --git a/install-runtime-packages.sh b/install-runtime-packages.sh
|
|
index 137d2e2..203b4bc 100755
|
|
--- a/install-runtime-packages.sh
|
|
+++ b/install-runtime-packages.sh
|
|
@@ -33,7 +33,7 @@ source $MY_DIR/build_utils.sh
|
|
|
|
# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
|
|
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
|
|
- MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel zlib-devel expat-devel"
|
|
+ MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel zlib-devel expat-devel"
|
|
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
|
MANYLINUX_DEPS="musl-dev libstdc++ glib-dev libx11-dev libxext-dev libxrender-dev mesa-dev libice-dev libsm-dev zlib-dev expat-dev"
|
|
else
|
|
@@ -54,7 +54,7 @@ else
|
|
exit 1
|
|
fi
|
|
|
|
-BASETOOLS="autoconf automake bison bzip2 diffutils file make patch unzip"
|
|
+BASETOOLS="autoconf automake bzip2 diffutils file make patch unzip"
|
|
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|
PACKAGE_MANAGER=yum
|
|
BASETOOLS="${BASETOOLS} hardlink hostname which"
|
|
@@ -73,9 +73,11 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|
if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
|
|
# Software collection (for devtoolset-10)
|
|
yum -y install centos-release-scl-rh
|
|
- # EPEL support (for yasm)
|
|
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
|
- TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
|
|
+ if [[ -d /opt/rocm ]]; then
|
|
+ TOOLCHAIN_DEPS="devtoolset-10-binutils devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-gcc-gfortran"
|
|
+ else
|
|
+ TOOLCHAIN_DEPS="devtoolset-11-binutils devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-gcc-gfortran"
|
|
+ fi
|
|
elif [ "${AUDITWHEEL_ARCH}" == "aarch64" ] || [ "${AUDITWHEEL_ARCH}" == "ppc64le" ] || [ "${AUDITWHEEL_ARCH}" == "s390x" ]; then
|
|
# Software collection (for devtoolset-10)
|
|
yum -y install centos-release-scl-rh
|
|
@@ -86,19 +88,21 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|
fi
|
|
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_28" ]; then
|
|
PACKAGE_MANAGER=dnf
|
|
- BASETOOLS="${BASETOOLS} curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libnsl libxcrypt which"
|
|
+ BASETOOLS="${BASETOOLS} yum-utils curl glibc-locale-source glibc-langpack-en hardlink hostname libcurl libxcrypt which"
|
|
# See https://unix.stackexchange.com/questions/41784/can-yum-express-a-preference-for-x86-64-over-i386-packages
|
|
echo "multilib_policy=best" >> /etc/yum.conf
|
|
# Error out if requested packages do not exist
|
|
echo "skip_missing_names_on_install=False" >> /etc/yum.conf
|
|
# Make sure that locale will not be removed
|
|
sed -i '/^override_install_langs=/d' /etc/yum.conf
|
|
- dnf -y upgrade
|
|
dnf -y install dnf-plugins-core
|
|
- dnf config-manager --set-enabled powertools # for yasm
|
|
- TOOLCHAIN_DEPS="gcc-toolset-12-binutils gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-gfortran"
|
|
- if [ "${AUDITWHEEL_ARCH}" == "x86_64" ]; then
|
|
- TOOLCHAIN_DEPS="${TOOLCHAIN_DEPS} yasm"
|
|
+ if test -f "/etc/yum.repos.d/ubi.repo"; then
|
|
+ sed -i 's/enabled\s*=\s*1/enabled = 1\nexclude=dotnet* aspnet* netstandard*/g' /etc/yum.repos.d/ubi.repo
|
|
+ fi
|
|
+ if [[ -d /usr/local/cuda ]]; then
|
|
+ TOOLCHAIN_DEPS="gcc gcc-c++"
|
|
+ else
|
|
+ TOOLCHAIN_DEPS="gcc-toolset-12-binutils gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-gcc-gfortran"
|
|
fi
|
|
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
|
TOOLCHAIN_DEPS="binutils gcc g++ gfortran"
|
|
@@ -121,12 +125,6 @@ else
|
|
exit 1
|
|
fi
|
|
|
|
-# update system packages, we already updated them but
|
|
-# the following script takes care of cleaning-up some things
|
|
-# and since it's also needed in the finalize step, everything's
|
|
-# centralized in this script to avoid code duplication
|
|
-LC_ALL=C ${MY_DIR}/update-system-packages.sh
|
|
-
|
|
if [ "${BASE_POLICY}" == "manylinux" ]; then
|
|
# we'll be removing libcrypt.so.1 later on
|
|
# this is needed to ensure the new one will be found
|