From c7aa5bd80448e2b160dd63072b47dedb7cd2e34b Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Tue, 10 Dec 2024 13:24:03 +1300 Subject: [PATCH 1/4] [ML] Windows 2022: Upgrade PyTorch to version 2.5.1 Update docs and configuration to refer to PyTorch 2.5.1 --- build-setup/windows.md | 6 +++--- dev-tools/build_windows_third_party_deps.ps1 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build-setup/windows.md b/build-setup/windows.md index f6f45d7de..523f2d6d9 100644 --- a/build-setup/windows.md +++ b/build-setup/windows.md @@ -202,7 +202,7 @@ On the "Advanced Options" screen, check "Install for all users" and "Add Python For the time being, do not take advantage of the option on the final installer screen to reconfigure the machine to allow paths longer than 260 characters. We still support Windows versions that do not have this option. -### PyTorch 2.5.0 +### PyTorch 2.5.1 (This step requires a lot of memory. It failed on a machine with 12GB of RAM. It just about fitted on a 20GB machine. 32GB RAM is recommended.) @@ -216,7 +216,7 @@ Next, in a Git bash shell run: ``` cd /c/tools -git clone --depth=1 --branch=v2.5.0 https://github.com/pytorch/pytorch.git +git clone --depth=1 --branch=v2.5.1 https://github.com/pytorch/pytorch.git cd pytorch git submodule sync git submodule update --init --recursive @@ -272,7 +272,7 @@ set USE_QNNPACK=OFF set USE_PYTORCH_QNNPACK=OFF set USE_XNNPACK=OFF set MSVC_Z7_OVERRIDE=OFF -set PYTORCH_BUILD_VERSION=2.5.0 +set PYTORCH_BUILD_VERSION=2.5.1 set PYTORCH_BUILD_NUMBER=1 python setup.py install ``` diff --git a/dev-tools/build_windows_third_party_deps.ps1 b/dev-tools/build_windows_third_party_deps.ps1 index cd07d0268..738711889 100644 --- a/dev-tools/build_windows_third_party_deps.ps1 +++ b/dev-tools/build_windows_third_party_deps.ps1 @@ -117,7 +117,7 @@ mv "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\$f\ # Build and install PyTorch (this may take a while) Write-Host "--- Installing PyTorch locally" cd c:\tools -git clone --depth=1 --branch=v2.5.0 https://github.com/pytorch/pytorch.git +git clone --depth=1 --branch=v2.5.1 https://github.com/pytorch/pytorch.git cd pytorch git submodule sync git submodule update --init --recursive @@ -131,7 +131,7 @@ set USE_QNNPACK=OFF set USE_PYTORCH_QNNPACK=OFF set USE_XNNPACK=OFF set MSVC_Z7_OVERRIDE=OFF -set PYTORCH_BUILD_VERSION=2.5.0 +set PYTORCH_BUILD_VERSION=2.5.1 set PYTORCH_BUILD_NUMBER=1 python setup.py install Write-Host "--- Done Installing PyTorch locally" From 83154d4c34b42397eba9cc1209baa5143e9730cd Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Tue, 10 Dec 2024 13:28:06 +1300 Subject: [PATCH 2/4] Update changelog --- docs/CHANGELOG.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index a14d4148a..a768e3a86 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -38,7 +38,7 @@ === Enhancements -* Update the PyTorch library to version 2.5.0. (See {ml-pull}2783[#2783], {ml-pull}2778[#2778].) +* Update the PyTorch library to version 2.5.1. (See {ml-pull}2783[#2783], {ml-pull}2799[#2799].) * Upgrade Boost libraries to version 1.86. (See {ml-pull}2780[#2780], {ml-pull}2779[#2779].) == {es} version 8.16.0 From 39e78e1978ecf47b9d1f241bffb94082760fdb9f Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Tue, 10 Dec 2024 13:54:10 +1300 Subject: [PATCH 3/4] Refer to latest Windows 2022 VM --- .buildkite/pipelines/build_windows.json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipelines/build_windows.json.py b/.buildkite/pipelines/build_windows.json.py index 0e547a409..b357944f8 100755 --- a/.buildkite/pipelines/build_windows.json.py +++ b/.buildkite/pipelines/build_windows.json.py @@ -45,7 +45,7 @@ def main(args): "provider": "gcp", "machineType": "c2-standard-16", "minCpuPlatform": "Intel Cascade Lake", - "image": "family/ml-cpp-3-windows-2022", + "image": "family/ml-cpp-4-windows-2022", }, "commands": [ f'if ( "{args.action}" -eq "debug" ) {{\$Env:ML_DEBUG="1"}}', From 042a9450042be7fba39b8970fe69106d6429e943 Mon Sep 17 00:00:00 2001 From: Ed Savage Date: Tue, 10 Dec 2024 16:11:04 +1300 Subject: [PATCH 4/4] Be more reilient to errors in powershell script --- dev-tools/build_windows_third_party_deps.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev-tools/build_windows_third_party_deps.ps1 b/dev-tools/build_windows_third_party_deps.ps1 index 738711889..1b1c32c69 100644 --- a/dev-tools/build_windows_third_party_deps.ps1 +++ b/dev-tools/build_windows_third_party_deps.ps1 @@ -158,9 +158,9 @@ mv "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\$f\ # Uninstall python, it was only needed for the PyTorch build & c:\tools\$PythonArchive /uninstall /quiet -rm c:\Python310 -recurse -force +rm c:\Python310 -recurse -force -ErrorAction Ignore # Remove c:\tools entirely cd c:\ -rm c:\tools -recurse -force +rm c:\tools -recurse -force -ErrorAction Ignore