From d4082a3230d7088008a0f5698e0818660a61f12d Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 13 Mar 2023 10:37:25 -0700 Subject: [PATCH 1/4] Revert "Upgrade cmake version to 3.22.1 to build triton (#1331)" This reverts commit 18c5017d9eedd2e5e203608e9ad6c05a2324b3ac. --- common/install_conda.sh | 4 +--- common/install_patchelf.sh | 4 +--- manywheel/Dockerfile | 5 ++--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/common/install_conda.sh b/common/install_conda.sh index 9bb4e3d21..c7967a615 100644 --- a/common/install_conda.sh +++ b/common/install_conda.sh @@ -9,7 +9,5 @@ chmod +x Miniconda3-latest-Linux-x86_64.sh bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda rm Miniconda3-latest-Linux-x86_64.sh export PATH=/opt/conda/bin:$PATH -# cmake-3.22.1 from conda, same as the one used by PyTorch CI. The system cmake -# is too old to build triton -conda install -y conda-build anaconda-client git ninja cmake=3.22.1 +conda install -y conda-build anaconda-client git ninja conda remove -y --force patchelf diff --git a/common/install_patchelf.sh b/common/install_patchelf.sh index 37b69415e..032e3cc27 100644 --- a/common/install_patchelf.sh +++ b/common/install_patchelf.sh @@ -2,9 +2,7 @@ set -ex -# Pin the version to latest release 0.17.2, building newer commit starts -# to fail on the current image -git clone -b 0.17.2 --single-branch https://github.com/NixOS/patchelf +git clone https://github.com/NixOS/patchelf cd patchelf sed -i 's/serial/parallel/g' configure.ac ./bootstrap.sh diff --git a/manywheel/Dockerfile b/manywheel/Dockerfile index 112716c98..5ccb5d200 100644 --- a/manywheel/Dockerfile +++ b/manywheel/Dockerfile @@ -21,10 +21,9 @@ RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm & rpm -ivh epel-release-latest-7.noarch.rpm && \ rm -f epel-release-latest-7.noarch.rpm -# cmake-3.22.1 from pip, same as the one used by PyTorch CI. cmake-3.18.4 is -# too old to build triton now +# cmake-3.18.4 from pip RUN yum install -y python3-pip && \ - python3 -mpip install cmake==3.22.1 && \ + python3 -mpip install cmake==3.18.4 && \ ln -s /usr/local/bin/cmake /usr/bin/cmake RUN yum install -y autoconf aclocal automake make From ae962d6373370688f771d76e7a9bfaa2a653b735 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 13 Mar 2023 10:41:26 -0700 Subject: [PATCH 2/4] Selective revert --- common/install_conda.sh | 4 +++- common/install_patchelf.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/install_conda.sh b/common/install_conda.sh index c7967a615..ae190638a 100644 --- a/common/install_conda.sh +++ b/common/install_conda.sh @@ -9,5 +9,7 @@ chmod +x Miniconda3-latest-Linux-x86_64.sh bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda rm Miniconda3-latest-Linux-x86_64.sh export PATH=/opt/conda/bin:$PATH -conda install -y conda-build anaconda-client git ninja +# The cmake version here needs to match with the minimum version of cmake +# supported by PyTorch +conda install -y conda-build anaconda-client git ninja cmake=3.18.4 conda remove -y --force patchelf diff --git a/common/install_patchelf.sh b/common/install_patchelf.sh index 032e3cc27..37b69415e 100644 --- a/common/install_patchelf.sh +++ b/common/install_patchelf.sh @@ -2,7 +2,9 @@ set -ex -git clone https://github.com/NixOS/patchelf +# Pin the version to latest release 0.17.2, building newer commit starts +# to fail on the current image +git clone -b 0.17.2 --single-branch https://github.com/NixOS/patchelf cd patchelf sed -i 's/serial/parallel/g' configure.ac ./bootstrap.sh From 9fb56e41b27277ea36bef261ad4f3205749dedc8 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 13 Mar 2023 10:56:21 -0700 Subject: [PATCH 3/4] Get cmake from pip --- common/install_conda.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/install_conda.sh b/common/install_conda.sh index ae190638a..c60fcb2cc 100644 --- a/common/install_conda.sh +++ b/common/install_conda.sh @@ -9,7 +9,9 @@ chmod +x Miniconda3-latest-Linux-x86_64.sh bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda rm Miniconda3-latest-Linux-x86_64.sh export PATH=/opt/conda/bin:$PATH +conda install -y conda-build anaconda-client git ninja cmake=3.22.1 # The cmake version here needs to match with the minimum version of cmake -# supported by PyTorch -conda install -y conda-build anaconda-client git ninja cmake=3.18.4 +# supported by PyTorch, conda doesn't have cmake 3.18.4 anymore while +# system cmake is too old (3.17.5). So we get it from pip like manywheel +conda run python3 -mpip install cmake==3.18.4 conda remove -y --force patchelf From 7d4afe7dab8cb80feb39935440b97c83506ed429 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Mon, 13 Mar 2023 11:04:48 -0700 Subject: [PATCH 4/4] Use 3.18.2 from conda --- common/install_conda.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/install_conda.sh b/common/install_conda.sh index c60fcb2cc..bd0607525 100644 --- a/common/install_conda.sh +++ b/common/install_conda.sh @@ -9,9 +9,7 @@ chmod +x Miniconda3-latest-Linux-x86_64.sh bash ./Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda rm Miniconda3-latest-Linux-x86_64.sh export PATH=/opt/conda/bin:$PATH -conda install -y conda-build anaconda-client git ninja cmake=3.22.1 # The cmake version here needs to match with the minimum version of cmake -# supported by PyTorch, conda doesn't have cmake 3.18.4 anymore while -# system cmake is too old (3.17.5). So we get it from pip like manywheel -conda run python3 -mpip install cmake==3.18.4 +# supported by PyTorch (3.18). There is only 3.18.2 on anaconda +conda install -y conda-build anaconda-client git ninja cmake=3.18.2 conda remove -y --force patchelf