From 561e93b6dc39aa1d097d1714e08d525daea1d92c Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 28 Feb 2025 12:58:44 +0100 Subject: [PATCH 001/120] add scripts and workflow for Windows arm64 audio & vision wheels --- .../scripts/winarm64/bootstrap_buildtools.bat | 65 ++++++++++ .github/scripts/winarm64/bootstrap_git.bat | 37 ++++++ .github/scripts/winarm64/bootstrap_python.bat | 47 ++++++++ .github/scripts/winarm64/build_audio.bat | 60 ++++++++++ .github/scripts/winarm64/build_vision.bat | 60 ++++++++++ .../workflows/build_wheels_windows_arm64.yml | 113 ++++++++++++++++++ 6 files changed, 382 insertions(+) create mode 100644 .github/scripts/winarm64/bootstrap_buildtools.bat create mode 100644 .github/scripts/winarm64/bootstrap_git.bat create mode 100644 .github/scripts/winarm64/bootstrap_python.bat create mode 100644 .github/scripts/winarm64/build_audio.bat create mode 100644 .github/scripts/winarm64/build_vision.bat create mode 100644 .github/workflows/build_wheels_windows_arm64.yml diff --git a/.github/scripts/winarm64/bootstrap_buildtools.bat b/.github/scripts/winarm64/bootstrap_buildtools.bat new file mode 100644 index 0000000000..7e02be3c99 --- /dev/null +++ b/.github/scripts/winarm64/bootstrap_buildtools.bat @@ -0,0 +1,65 @@ +@echo off +setlocal enabledelayedexpansion + +echo Dependency MSVC Build Tools with C++ with ARM64/ARM64EC components installation started. + +:: Pre-check for downloads and dependencies folders +if not exist "%DOWNLOADS_DIR%" mkdir "%DOWNLOADS_DIR%" +if not exist "%DEPENDENCIES_DIR%" mkdir "%DEPENDENCIES_DIR%" + +:: Set download URL for the Visual Studio Installer +set DOWNLOAD_URL=https://aka.ms/vs/17/release/vs_BuildTools.exe +set INSTALLER_FILE=%DOWNLOADS_DIR%\vs_BuildTools.exe + +:: Download installer +echo Downloading Visual Studio Build Tools with C++ installer... +curl -L -o "%INSTALLER_FILE%" %DOWNLOAD_URL% + +:: Install the Visual Studio Build Tools with C++ components +echo Installing Visual Studio Build Tools with C++ components... +echo Installing MSVC %MSVC_VERSION% +if "%MSVC_VERSION%" == "latest" ( + "%INSTALLER_FILE%" --norestart --quiet --wait --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ + --add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ + --add Microsoft.Component.MSBuild ^ + --add Microsoft.VisualStudio.Component.CoreBuildTools ^ + --add Microsoft.VisualStudio.Workload.MSBuildTools ^ + --add Microsoft.VisualStudio.Component.Windows10SDK ^ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ + --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ + --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.TestTools.BuildTools ^ + --add Microsoft.VisualStudio.Component.VC.ASAN ^ + --add Microsoft.VisualStudio.Component.TextTemplating ^ + --add Microsoft.VisualStudio.Component.VC.CoreIde ^ + --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ + --add Microsoft.VisualStudio.Workload.VCTools ^ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64EC ^ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 +) else if "%MSVC_VERSION%" == "14.40" ( + "%INSTALLER_FILE%" --norestart --nocache --quiet --wait --fix --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ + --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ + --add Microsoft.VisualStudio.Component.VC.ASAN ^ + --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.VC.14.40.17.10.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64 +) else if "%MSVC_VERSION%" == "14.36" ( + "%INSTALLER_FILE%" --norestart --nocache --quiet --wait --fix --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ + --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ + --add Microsoft.VisualStudio.Component.VC.ASAN ^ + --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.VC.14.36.17.6.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64 +) + +echo exitcode = %errorlevel% + +:: Check if installation was successful +if %errorlevel% neq 0 ( + echo Failed to install Visual Studio Build Tools with C++ components. + exit /b 1 +) + +echo Dependency Visual Studio Build Tools with C++ installation finished. \ No newline at end of file diff --git a/.github/scripts/winarm64/bootstrap_git.bat b/.github/scripts/winarm64/bootstrap_git.bat new file mode 100644 index 0000000000..5d3d511afc --- /dev/null +++ b/.github/scripts/winarm64/bootstrap_git.bat @@ -0,0 +1,37 @@ +:: we need to install newer version of Git manually as "-submodules" function is not supported in the default version of runner. + +@echo off + +echo Dependency Git installation started. + +:: Pre-check for downloads and dependencies folders +if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% +if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% + +:: Set download URL for the Git +set DOWNLOAD_URL="https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" +set INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe + +:: Download installer +echo Downloading Git... +curl -L -o "%INSTALLER_FILE%" %DOWNLOAD_URL% + +:: Install Git +echo Installing Git... +"%INSTALLER_FILE%" /VERYSILENT /DIR="%DEPENDENCIES_DIR%\git" + +dir %DEPENDENCIES_DIR%\git + +:: Check if installation was successful +if %errorlevel% neq 0 ( + echo "Failed to install Git. (exitcode = %errorlevel%)" + exit /b 1 +) + +:: Enable long paths +call "%DEPENDENCIES_DIR%\git\cmd\git.exe" config --system core.longpaths true + +:: Add to PATH +echo %DEPENDENCIES_DIR%\git\cmd\;%DEPENDENCIES_DIR%\git\bin\>> %GITHUB_PATH% + +echo Dependency Git installation finished. \ No newline at end of file diff --git a/.github/scripts/winarm64/bootstrap_python.bat b/.github/scripts/winarm64/bootstrap_python.bat new file mode 100644 index 0000000000..e8c76ff119 --- /dev/null +++ b/.github/scripts/winarm64/bootstrap_python.bat @@ -0,0 +1,47 @@ +@echo off + +echo Dependency Python installation started. + +:: Pre-check for downloads and dependencies folders +if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% +if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% + +echo PYTHON_VERSION is %PYTHON_VERSION% + +if "%PYTHON_VERSION%" == "3.13" ( + echo Python version is set to 3.13 + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.13.2/python-3.13.2-arm64.exe +) +else if "%PYTHON_VERSION%" == "3.12" ( + echo Python version is set to 3.12 + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-arm64.exe +) else if "%PYTHON_VERSION%" == "3.11" ( + echo Python version is set to 3.11 + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.11.9/python-3.11.9-arm64.exe +) else ( + echo PYTHON_VERSION not defined, Python version is set to 3.12 + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-arm64.exe +) + +set INSTALLER_FILE=%DOWNLOADS_DIR%\python-installer.exe + +:: Download installer +echo Downloading Python... +curl -L -o "%INSTALLER_FILE%" "%DOWNLOAD_URL%" + +:: Install Python +echo Installing Python... +"%INSTALLER_FILE%" /quiet Include_debug=1 TargetDir="%DEPENDENCIES_DIR%\Python" + +:: Check if installation was successful +if %errorlevel% neq 0 ( + echo "Failed to install Python. (exitcode = %errorlevel%)" + exit /b 1 +) + +:: Add to PATH +echo %DEPENDENCIES_DIR%\Python\>> %GITHUB_PATH% +echo %DEPENDENCIES_DIR%\Python\scripts\>> %GITHUB_PATH% +echo %DEPENDENCIES_DIR%\Python\libs\>> %GITHUB_PATH% + +echo Dependency Python installation finished. \ No newline at end of file diff --git a/.github/scripts/winarm64/build_audio.bat b/.github/scripts/winarm64/build_audio.bat new file mode 100644 index 0000000000..ee5df129be --- /dev/null +++ b/.github/scripts/winarm64/build_audio.bat @@ -0,0 +1,60 @@ +@echo on +set SRC_PATH=%GITHUB_WORKSPACE%\%SRC_DIR% +set CMAKE_BUILD_TYPE=%BUILD_TYPE% +set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat +set CONDA_PREFIX=%DEPENDENCIES_DIR% +set PATH=%PATH%;%CONDA_PREFIX%\Library\bin +set DISTUTILS_USE_SDK=1 +set USE_FFMPEG=1 +set FFMPEG_ROOT=%DEPENDENCIES_DIR%\Library + +:: find torch file name by searching +for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" + +:: Dependencies +if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% +if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% +echo * > %DOWNLOADS_DIR%\.gitignore +echo * > %DEPENDENCIES_DIR%\.gitignore + +:: install vcpkg +cd %DOWNLOADS_DIR% +:: for ffmpeg 6.1.1 - pinning the version of vcpkg +:: https://pytorch.org/audio/stable/installation.html +git clone https://github.com/microsoft/vcpkg.git -b 2024.07.12 +cd vcpkg +call bootstrap-vcpkg.bat + +:: install dependencies +vcpkg install ffmpeg[ffmpeg]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +robocopy /E %DEPENDENCIES_DIR%\arm64-windows %DEPENDENCIES_DIR%\Library +robocopy /E %DEPENDENCIES_DIR%\Library\tools\ffmpeg %DEPENDENCIES_DIR%\Library\bin +robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\src\torio\lib + +:: test ffmpeg +echo %FFMPEG_ROOT% +ffmpeg -version + +:: Source directory +cd %SRC_PATH% + +:: Virtual environment +python -m pip install --upgrade pip +python -m venv .venv +echo * > .venv\.gitignore +call .\.venv\Scripts\activate + +:: Install dependencies +pip install %PYTORCH_PATH% + +:: Activate visual studio +call "%VCVARSALL_PATH%" arm64 + +:: Creates wheel under dist folder +python setup.py bdist_wheel + +:: Check if installation was successful +if %errorlevel% neq 0 ( + echo "Failed on build_audio. (exitcode = %errorlevel%)" + exit /b 1 +) \ No newline at end of file diff --git a/.github/scripts/winarm64/build_vision.bat b/.github/scripts/winarm64/build_vision.bat new file mode 100644 index 0000000000..21139b347e --- /dev/null +++ b/.github/scripts/winarm64/build_vision.bat @@ -0,0 +1,60 @@ +@echo on +set SRC_PATH=%GITHUB_WORKSPACE%\%SRC_DIR% +set CMAKE_BUILD_TYPE=%BUILD_TYPE% +set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat +set CONDA_PREFIX=%DEPENDENCIES_DIR% +set PATH=%PATH%;%CONDA_PREFIX%\Library\bin +set DISTUTILS_USE_SDK=1 +:: find toch file name by searching +for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" + +:: Dependencies +if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% +if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% +echo * > %DOWNLOADS_DIR%\.gitignore +echo * > %DEPENDENCIES_DIR%\.gitignore + +:: install vcpkg +cd %DOWNLOADS_DIR% +git clone https://github.com/microsoft/vcpkg.git +cd vcpkg +call bootstrap-vcpkg.bat + +:: install dependencies +vcpkg install libjpeg-turbo:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +vcpkg install libwebp:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +vcpkg install libpng[tools]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +:: https://pytorch.org/vision/stable/index.html +:: Building with FFMPEG is disabled by default in the latest main +:: vcpkg install ffmpeg[ffmpeg]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +copy %DEPENDENCIES_DIR%\arm64-windows\lib\libpng16.lib %DEPENDENCIES_DIR%\arm64-windows\lib\libpng.lib +copy %DEPENDENCIES_DIR%\arm64-windows\bin\libpng16.dll %DEPENDENCIES_DIR%\arm64-windows\bin\libpng.dll +copy %DEPENDENCIES_DIR%\arm64-windows\bin\libpng16.pdb %DEPENDENCIES_DIR%\arm64-windows\bin\libpng.pdb +robocopy /E %DEPENDENCIES_DIR%\arm64-windows %DEPENDENCIES_DIR%\Library +robocopy /E %DEPENDENCIES_DIR%\Library\tools\libpng %DEPENDENCIES_DIR%\Library\bin +robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll + +:: Source directory +cd %SRC_PATH% + +:: Virtual environment +python -m pip install --upgrade pip +python -m venv .venv +echo * > .venv\.gitignore +call .\.venv\Scripts\activate + +:: Install dependencies +pip install numpy +pip install %PYTORCH_PATH% + +:: Activate visual studio +call "%VCVARSALL_PATH%" arm64 + +:: Creates wheel under dist folder +python setup.py bdist_wheel + +:: Check if installation was successful +if %errorlevel% neq 0 ( + echo "Failed on build_vision. (exitcode = %errorlevel%)" + exit /b 1 +) \ No newline at end of file diff --git a/.github/workflows/build_wheels_windows_arm64.yml b/.github/workflows/build_wheels_windows_arm64.yml new file mode 100644 index 0000000000..05af55b6c0 --- /dev/null +++ b/.github/workflows/build_wheels_windows_arm64.yml @@ -0,0 +1,113 @@ +name: torchaudio Build + +on: + workflow_dispatch: + inputs: + python_version: + description: "Python version" + required: true + type: choice + options: + - Python312 + - Python311 + msvc_version: + description: "MSVC Version" + required: true + type: choice + options: + - 'latest' + - '14.40' + - '14.36' + pytorch_build_run_id: + # TODO: Update this after running the PyTorch build workflow + description: "PyTorch build run id for downloading the wheel artifact (number at the end of build run URL)" + required: true + default: "" + type: string + pytorch_build_artifact_name: + description: "Artifact name of PyTorch build run" + required: true + default: "pytorch-wheel" + type: string + build_type: + description: "Build type" + required: true + type: choice + options: + - Release + # - Debug (not supported for wheel) + repository_name: + description: "Repository name (username/repo)" + required: true + type: string + repository_branch: + description: "Repository branch" + required: true + type: string + build_version: + description: "Optional: build version for wheel file name (e.g. 2.6.0); otherwise leave empty for default naming" + required: false + type: string + +env: + DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repo_name }} + DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repo_name }} + SCRIPTS_DIR: .github\scripts\winarm64\ + SRC_DIR: src_audio + PYTHON_VERSION: ${{ inputs.python_version }} + MSVC_VERSION: ${{ inputs.msvc_version }} + BUILD_TYPE: ${{ inputs.build_type }} + BUILD_VERSION : ${{ inputs.torchaudio_build_version }} + +permissions: write-all + +jobs: + build: + name: Build wheel + runs-on: [TODO WAIT FOR NAME] + steps: + - name: Git checkout workflow + uses: actions/checkout@v4 + - name: Bootstrap Git + run: | + & ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat + - name: Bootstrap Python + run: | + & ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat + - name: Bootstrap Build Tools + run: | + & ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat + # TODO This should not be needed, update it when tested + # - name: Download PyTorch wheel artifact + # uses: actions/download-artifact@v4 + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # run-id: ${{ inputs.pytorch_build_run_id }} + # name: ${{ inputs.pytorch_build_artifact_name }} + # path: ${{ env.DOWNLOADS_DIR }} + - name: Git checkout repo ${{ inputs.repo_name }} + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository_name }} + ref: ${{ inputs.repository_branch }} + path: ${{ env.SRC_DIR }} + submodules: recursive + - name: Call Build Script + shell: pwsh + run: | + $repo_name = "${{ inputs.repo_name }}".Split("/")[-1] # Extract 'audio' or 'vision' + echo "REPO_NAME=$repo_name" | Out-File -FilePath $env:GITHUB_ENV -Append + if ($repo_name -eq "audio") { + ${{ env.SCRIPTS_DIR }}/build_audio.bat + } else if ($repo_name -eq "vision") { + ${{ env.SCRIPTS_DIR }}/build_vision.bat + } else { + throw "Invalid repository name: $repo_name" + } + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.REPO_NAME }}-wheel + path: ${{ env.SRC_DIR }}/dist/* + compression-level: 0 + retention-days: 3 \ No newline at end of file From 72935128e973d981ad848cbde2f6362dda7acba4 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 11:39:52 +0100 Subject: [PATCH 002/120] fix workflow_call --- .../workflows/build_wheels_windows_arm64.yml | 53 ++++++------------- 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build_wheels_windows_arm64.yml b/.github/workflows/build_wheels_windows_arm64.yml index 05af55b6c0..cb5f5a9cb1 100644 --- a/.github/workflows/build_wheels_windows_arm64.yml +++ b/.github/workflows/build_wheels_windows_arm64.yml @@ -1,51 +1,30 @@ -name: torchaudio Build +name: Arm64 Wheels Build on: - workflow_dispatch: + workflow_call: inputs: - python_version: - description: "Python version" - required: true - type: choice - options: - - Python312 - - Python311 - msvc_version: - description: "MSVC Version" - required: true - type: choice - options: - - 'latest' - - '14.40' - - '14.36' - pytorch_build_run_id: - # TODO: Update this after running the PyTorch build workflow - description: "PyTorch build run id for downloading the wheel artifact (number at the end of build run URL)" + repository_name: required: true - default: "" type: string - pytorch_build_artifact_name: - description: "Artifact name of PyTorch build run" + repository_branch: required: true - default: "pytorch-wheel" type: string - build_type: - description: "Build type" - required: true - type: choice - options: - - Release - # - Debug (not supported for wheel) - repository_name: - description: "Repository name (username/repo)" - required: true + python_version: + required: false + default: "Python312" type: string - repository_branch: - description: "Repository branch" + msvc_version: + required: false + default: "latest" + type: string + pytorch_build_run_id: required: true type: string + build_type: + required: false + default: "Release" + type: string build_version: - description: "Optional: build version for wheel file name (e.g. 2.6.0); otherwise leave empty for default naming" required: false type: string From 07893bb1f17952a489e443c65e174fdfbcb9591a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 11:53:17 +0100 Subject: [PATCH 003/120] update runner name --- .github/workflows/build_wheels_windows_arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_arm64.yml b/.github/workflows/build_wheels_windows_arm64.yml index cb5f5a9cb1..ee3d6cc78d 100644 --- a/.github/workflows/build_wheels_windows_arm64.yml +++ b/.github/workflows/build_wheels_windows_arm64.yml @@ -42,8 +42,8 @@ permissions: write-all jobs: build: + runs-on: "windows-11-arm64" name: Build wheel - runs-on: [TODO WAIT FOR NAME] steps: - name: Git checkout workflow uses: actions/checkout@v4 From c9a8eb52ce873aca5dc31d7ccacf091a920fb29a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 12:21:50 +0100 Subject: [PATCH 004/120] update permissions --- .github/workflows/build_wheels_windows_arm64.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_arm64.yml b/.github/workflows/build_wheels_windows_arm64.yml index ee3d6cc78d..07e68ad8b7 100644 --- a/.github/workflows/build_wheels_windows_arm64.yml +++ b/.github/workflows/build_wheels_windows_arm64.yml @@ -38,7 +38,9 @@ env: BUILD_TYPE: ${{ inputs.build_type }} BUILD_VERSION : ${{ inputs.torchaudio_build_version }} -permissions: write-all +permissions: + id-token: write + contents: read jobs: build: From 30f6472c909333ffc5a035c6f274f93c02a2eefa Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 12:40:42 +0100 Subject: [PATCH 005/120] use arm64 logic for building x64 dummy wheel --- .../bootstrap_buildtools.bat | 0 .../bootstrap_git.bat | 0 .../bootstrap_python.bat | 8 +++---- .../{winarm64 => winx64test}/build_audio.bat | 6 ++--- .../{winarm64 => winx64test}/build_vision.bat | 24 +++++++++---------- ....yml => build_wheels_windows_x64_test.yml} | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) rename .github/scripts/{winarm64 => winx64test}/bootstrap_buildtools.bat (100%) rename .github/scripts/{winarm64 => winx64test}/bootstrap_git.bat (100%) rename .github/scripts/{winarm64 => winx64test}/bootstrap_python.bat (94%) rename .github/scripts/{winarm64 => winx64test}/build_audio.bat (89%) rename .github/scripts/{winarm64 => winx64test}/build_vision.bat (59%) rename .github/workflows/{build_wheels_windows_arm64.yml => build_wheels_windows_x64_test.yml} (97%) diff --git a/.github/scripts/winarm64/bootstrap_buildtools.bat b/.github/scripts/winx64test/bootstrap_buildtools.bat similarity index 100% rename from .github/scripts/winarm64/bootstrap_buildtools.bat rename to .github/scripts/winx64test/bootstrap_buildtools.bat diff --git a/.github/scripts/winarm64/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat similarity index 100% rename from .github/scripts/winarm64/bootstrap_git.bat rename to .github/scripts/winx64test/bootstrap_git.bat diff --git a/.github/scripts/winarm64/bootstrap_python.bat b/.github/scripts/winx64test/bootstrap_python.bat similarity index 94% rename from .github/scripts/winarm64/bootstrap_python.bat rename to .github/scripts/winx64test/bootstrap_python.bat index e8c76ff119..2de5e76584 100644 --- a/.github/scripts/winarm64/bootstrap_python.bat +++ b/.github/scripts/winx64test/bootstrap_python.bat @@ -10,17 +10,17 @@ echo PYTHON_VERSION is %PYTHON_VERSION% if "%PYTHON_VERSION%" == "3.13" ( echo Python version is set to 3.13 - set DOWNLOAD_URL=https://www.python.org/ftp/python/3.13.2/python-3.13.2-arm64.exe + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe ) else if "%PYTHON_VERSION%" == "3.12" ( echo Python version is set to 3.12 - set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-arm64.exe + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe ) else if "%PYTHON_VERSION%" == "3.11" ( echo Python version is set to 3.11 - set DOWNLOAD_URL=https://www.python.org/ftp/python/3.11.9/python-3.11.9-arm64.exe + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe ) else ( echo PYTHON_VERSION not defined, Python version is set to 3.12 - set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-arm64.exe + set DOWNLOAD_URL=https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe ) set INSTALLER_FILE=%DOWNLOADS_DIR%\python-installer.exe diff --git a/.github/scripts/winarm64/build_audio.bat b/.github/scripts/winx64test/build_audio.bat similarity index 89% rename from .github/scripts/winarm64/build_audio.bat rename to .github/scripts/winx64test/build_audio.bat index ee5df129be..192a04809c 100644 --- a/.github/scripts/winarm64/build_audio.bat +++ b/.github/scripts/winx64test/build_audio.bat @@ -26,8 +26,8 @@ cd vcpkg call bootstrap-vcpkg.bat :: install dependencies -vcpkg install ffmpeg[ffmpeg]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% -robocopy /E %DEPENDENCIES_DIR%\arm64-windows %DEPENDENCIES_DIR%\Library +vcpkg install ffmpeg[ffmpeg]:x64-windows --x-install-root=%DEPENDENCIES_DIR% +robocopy /E %DEPENDENCIES_DIR%\x64-windows %DEPENDENCIES_DIR%\Library robocopy /E %DEPENDENCIES_DIR%\Library\tools\ffmpeg %DEPENDENCIES_DIR%\Library\bin robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\src\torio\lib @@ -48,7 +48,7 @@ call .\.venv\Scripts\activate pip install %PYTORCH_PATH% :: Activate visual studio -call "%VCVARSALL_PATH%" arm64 +call "%VCVARSALL_PATH%" x64 :: Creates wheel under dist folder python setup.py bdist_wheel diff --git a/.github/scripts/winarm64/build_vision.bat b/.github/scripts/winx64test/build_vision.bat similarity index 59% rename from .github/scripts/winarm64/build_vision.bat rename to .github/scripts/winx64test/build_vision.bat index 21139b347e..bf1dc7ce3f 100644 --- a/.github/scripts/winarm64/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -5,8 +5,8 @@ set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall. set CONDA_PREFIX=%DEPENDENCIES_DIR% set PATH=%PATH%;%CONDA_PREFIX%\Library\bin set DISTUTILS_USE_SDK=1 -:: find toch file name by searching -for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" +@REM :: find toch file name by searching +@REM for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" :: Dependencies if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% @@ -21,16 +21,16 @@ cd vcpkg call bootstrap-vcpkg.bat :: install dependencies -vcpkg install libjpeg-turbo:arm64-windows --x-install-root=%DEPENDENCIES_DIR% -vcpkg install libwebp:arm64-windows --x-install-root=%DEPENDENCIES_DIR% -vcpkg install libpng[tools]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% +vcpkg install libjpeg-turbo:x64-windows --x-install-root=%DEPENDENCIES_DIR% +vcpkg install libwebp:x64-windows --x-install-root=%DEPENDENCIES_DIR% +vcpkg install libpng[tools]:x64-windows --x-install-root=%DEPENDENCIES_DIR% :: https://pytorch.org/vision/stable/index.html :: Building with FFMPEG is disabled by default in the latest main -:: vcpkg install ffmpeg[ffmpeg]:arm64-windows --x-install-root=%DEPENDENCIES_DIR% -copy %DEPENDENCIES_DIR%\arm64-windows\lib\libpng16.lib %DEPENDENCIES_DIR%\arm64-windows\lib\libpng.lib -copy %DEPENDENCIES_DIR%\arm64-windows\bin\libpng16.dll %DEPENDENCIES_DIR%\arm64-windows\bin\libpng.dll -copy %DEPENDENCIES_DIR%\arm64-windows\bin\libpng16.pdb %DEPENDENCIES_DIR%\arm64-windows\bin\libpng.pdb -robocopy /E %DEPENDENCIES_DIR%\arm64-windows %DEPENDENCIES_DIR%\Library +:: vcpkg install ffmpeg[ffmpeg]:x64-windows --x-install-root=%DEPENDENCIES_DIR% +copy %DEPENDENCIES_DIR%\x64-windows\lib\libpng16.lib %DEPENDENCIES_DIR%\x64-windows\lib\libpng.lib +copy %DEPENDENCIES_DIR%\x64-windows\bin\libpng16.dll %DEPENDENCIES_DIR%\x64-windows\bin\libpng.dll +copy %DEPENDENCIES_DIR%\x64-windows\bin\libpng16.pdb %DEPENDENCIES_DIR%\x64-windows\bin\libpng.pdb +robocopy /E %DEPENDENCIES_DIR%\x64-windows %DEPENDENCIES_DIR%\Library robocopy /E %DEPENDENCIES_DIR%\Library\tools\libpng %DEPENDENCIES_DIR%\Library\bin robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll @@ -45,10 +45,10 @@ call .\.venv\Scripts\activate :: Install dependencies pip install numpy -pip install %PYTORCH_PATH% +pip3 install torch :: Activate visual studio -call "%VCVARSALL_PATH%" arm64 +call "%VCVARSALL_PATH%" x64 :: Creates wheel under dist folder python setup.py bdist_wheel diff --git a/.github/workflows/build_wheels_windows_arm64.yml b/.github/workflows/build_wheels_windows_x64_test.yml similarity index 97% rename from .github/workflows/build_wheels_windows_arm64.yml rename to .github/workflows/build_wheels_windows_x64_test.yml index 07e68ad8b7..7b52ffa4d8 100644 --- a/.github/workflows/build_wheels_windows_arm64.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repo_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repo_name }} - SCRIPTS_DIR: .github\scripts\winarm64\ + SCRIPTS_DIR: .github\scripts\winxm64test\ SRC_DIR: src_audio PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -44,7 +44,7 @@ permissions: jobs: build: - runs-on: "windows-11-arm64" + runs-on: windows-latest name: Build wheel steps: - name: Git checkout workflow From af3fa0ac50a425a480c090a3ea514be601515c6b Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 12:48:33 +0100 Subject: [PATCH 006/120] remove run_id reference for now --- .github/workflows/build_wheels_windows_x64_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 7b52ffa4d8..7caa29a3b9 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -1,4 +1,4 @@ -name: Arm64 Wheels Build +name: X64 Wheels Build on: workflow_call: @@ -17,9 +17,9 @@ on: required: false default: "latest" type: string - pytorch_build_run_id: - required: true - type: string + # pytorch_build_run_id: + # required: true + # type: string build_type: required: false default: "Release" From e6cba571a5485a8529ff889858e3aa347cffa363 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 14:05:36 +0100 Subject: [PATCH 007/120] fix path --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 7caa29a3b9..33dfcd1d53 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repo_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repo_name }} - SCRIPTS_DIR: .github\scripts\winxm64test\ + SCRIPTS_DIR: .github\scripts\winx64test\ SRC_DIR: src_audio PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} From 055311855e01588520f491b99966d15191391032 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 14:21:37 +0100 Subject: [PATCH 008/120] update powershell run command --- .../workflows/build_wheels_windows_x64_test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 33dfcd1d53..e650aa492e 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -32,7 +32,7 @@ env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repo_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repo_name }} SCRIPTS_DIR: .github\scripts\winx64test\ - SRC_DIR: src_audio + SRC_DIR: src\${{ inputs.repo_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} BUILD_TYPE: ${{ inputs.build_type }} @@ -51,13 +51,13 @@ jobs: uses: actions/checkout@v4 - name: Bootstrap Git run: | - & ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat + cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat - name: Bootstrap Python run: | - & ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat + cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat - name: Bootstrap Build Tools run: | - & ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat + cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -79,9 +79,9 @@ jobs: $repo_name = "${{ inputs.repo_name }}".Split("/")[-1] # Extract 'audio' or 'vision' echo "REPO_NAME=$repo_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repo_name -eq "audio") { - ${{ env.SCRIPTS_DIR }}/build_audio.bat + cmd /c ${{ env.SCRIPTS_DIR }}\build_audio.bat } else if ($repo_name -eq "vision") { - ${{ env.SCRIPTS_DIR }}/build_vision.bat + cmd /c ${{ env.SCRIPTS_DIR }}\build_vision.bat } else { throw "Invalid repository name: $repo_name" } @@ -89,6 +89,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.REPO_NAME }}-wheel - path: ${{ env.SRC_DIR }}/dist/* + path: ${{ env.SRC_DIR }}\dist\* compression-level: 0 retention-days: 3 \ No newline at end of file From 378372d3c792a9d74459f00eeb79d7a8b77ce00e Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 14:26:29 +0100 Subject: [PATCH 009/120] update path and input variable name --- .../build_wheels_windows_x64_test.yml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index e650aa492e..28612a28c2 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -29,10 +29,10 @@ on: type: string env: - DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repo_name }} - DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repo_name }} + DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} + DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} SCRIPTS_DIR: .github\scripts\winx64test\ - SRC_DIR: src\${{ inputs.repo_name }} + SRC_DIR: src\ PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} BUILD_TYPE: ${{ inputs.build_type }} @@ -51,13 +51,13 @@ jobs: uses: actions/checkout@v4 - name: Bootstrap Git run: | - cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat + cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_git.bat - name: Bootstrap Python run: | - cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat + cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_python.bat - name: Bootstrap Build Tools run: | - cmd /c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat + cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -66,7 +66,7 @@ jobs: # run-id: ${{ inputs.pytorch_build_run_id }} # name: ${{ inputs.pytorch_build_artifact_name }} # path: ${{ env.DOWNLOADS_DIR }} - - name: Git checkout repo ${{ inputs.repo_name }} + - name: Git checkout repo ${{ inputs.repository_name }} uses: actions/checkout@v4 with: repository: ${{ inputs.repository_name }} @@ -76,19 +76,19 @@ jobs: - name: Call Build Script shell: pwsh run: | - $repo_name = "${{ inputs.repo_name }}".Split("/")[-1] # Extract 'audio' or 'vision' - echo "REPO_NAME=$repo_name" | Out-File -FilePath $env:GITHUB_ENV -Append - if ($repo_name -eq "audio") { - cmd /c ${{ env.SCRIPTS_DIR }}\build_audio.bat - } else if ($repo_name -eq "vision") { - cmd /c ${{ env.SCRIPTS_DIR }}\build_vision.bat + $repository_name = "${{ inputs.repository_name }}".Split("/")[-1] # Extract 'audio' or 'vision' + echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append + if ($repository_name -eq "audio") { + cmd /c ${{ env.SCRIPTS_DIR }}/build_audio.bat + } else if ($repository_name -eq "vision") { + cmd /c ${{ env.SCRIPTS_DIR }}/build_vision.bat } else { - throw "Invalid repository name: $repo_name" + throw "Invalid repository name: $repository_name" } - name: Upload Artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.REPO_NAME }}-wheel + name: ${{ env.repository_name }}-wheel path: ${{ env.SRC_DIR }}\dist\* compression-level: 0 retention-days: 3 \ No newline at end of file From 44c0a561f1b2346e770f44d4819650188cea5177 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 14:29:28 +0100 Subject: [PATCH 010/120] update paths --- .github/workflows/build_wheels_windows_x64_test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 28612a28c2..39b72c76b5 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -51,13 +51,13 @@ jobs: uses: actions/checkout@v4 - name: Bootstrap Git run: | - cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_git.bat + cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat - name: Bootstrap Python run: | - cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_python.bat + cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat - name: Bootstrap Build Tools run: | - cmd /c ${{ env.SCRIPTS_DIR }}/bootstrap_buildtools.bat + cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -79,9 +79,9 @@ jobs: $repository_name = "${{ inputs.repository_name }}".Split("/")[-1] # Extract 'audio' or 'vision' echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repository_name -eq "audio") { - cmd /c ${{ env.SCRIPTS_DIR }}/build_audio.bat + cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat } else if ($repository_name -eq "vision") { - cmd /c ${{ env.SCRIPTS_DIR }}/build_vision.bat + cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat } else { throw "Invalid repository name: $repository_name" } From a3d2e536d388ea1c63771a2c2752bdf242949e99 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 15:26:50 +0100 Subject: [PATCH 011/120] fix elseif --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 39b72c76b5..0a1bb9f74b 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -80,7 +80,7 @@ jobs: echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repository_name -eq "audio") { cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat - } else if ($repository_name -eq "vision") { + } elseif ($repository_name -eq "vision") { cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat } else { throw "Invalid repository name: $repository_name" From dc5367f4086051229b40632385c1eadb34a43da4 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 15:55:36 +0100 Subject: [PATCH 012/120] update Source dir path and pwsh calls --- .github/workflows/build_wheels_windows_x64_test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 0a1bb9f74b..47065fcfdb 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -32,7 +32,7 @@ env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} SCRIPTS_DIR: .github\scripts\winx64test\ - SRC_DIR: src\ + SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} BUILD_TYPE: ${{ inputs.build_type }} @@ -77,11 +77,13 @@ jobs: shell: pwsh run: | $repository_name = "${{ inputs.repository_name }}".Split("/")[-1] # Extract 'audio' or 'vision' + echo "$repository_name" echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repository_name -eq "audio") { - cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat + & "${{ env.SCRIPTS_DIR }}\build_audio.bat" } elseif ($repository_name -eq "vision") { - cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat + & "${{ env.SCRIPTS_DIR }}\build_vision.bat" + echo "Done Building Vision"" } else { throw "Invalid repository name: $repository_name" } From 8d0979b24550c0dee2675bec98581848d2b06022 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 15:57:56 +0100 Subject: [PATCH 013/120] fix typo --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 47065fcfdb..bc539ec5fc 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -83,7 +83,7 @@ jobs: & "${{ env.SCRIPTS_DIR }}\build_audio.bat" } elseif ($repository_name -eq "vision") { & "${{ env.SCRIPTS_DIR }}\build_vision.bat" - echo "Done Building Vision"" + echo "Done Building Vision" } else { throw "Invalid repository name: $repository_name" } From 2bdf110b8b42269dc298e50a780e1e6e4297554d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:05:34 +0100 Subject: [PATCH 014/120] fix powershell call --- .github/workflows/build_wheels_windows_x64_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index bc539ec5fc..026cb2a0b6 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -80,9 +80,9 @@ jobs: echo "$repository_name" echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repository_name -eq "audio") { - & "${{ env.SCRIPTS_DIR }}\build_audio.bat" + cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat } elseif ($repository_name -eq "vision") { - & "${{ env.SCRIPTS_DIR }}\build_vision.bat" + cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat echo "Done Building Vision" } else { throw "Invalid repository name: $repository_name" From 02a01714103085a5236aa414409e8ea71edec338 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:13:25 +0100 Subject: [PATCH 015/120] modify dummy path --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 026cb2a0b6..9f94418867 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -91,6 +91,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.repository_name }}-wheel - path: ${{ env.SRC_DIR }}\dist\* + path: ${{ env.SRC_DIR }}\vision\dist\* compression-level: 0 retention-days: 3 \ No newline at end of file From 872de9598755ffaa5611942c5498913f16d8fa9f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:14:43 +0100 Subject: [PATCH 016/120] add debug prints --- .github/workflows/build_wheels_windows_x64_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 9f94418867..0136d10425 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -87,6 +87,9 @@ jobs: } else { throw "Invalid repository name: $repository_name" } + dir ${{ env.SRC_DIR }}\vision\dist + echo "Test Print" + dir ${{ env.SRC_DIR }}\dist - name: Upload Artifact uses: actions/upload-artifact@v4 with: From c181fdbd2c62635524f719af269cea996de36f3c Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:18:06 +0100 Subject: [PATCH 017/120] add extra print debug --- .github/scripts/winx64test/build_vision.bat | 1 + .github/workflows/build_wheels_windows_x64_test.yml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index bf1dc7ce3f..e42d4847e6 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -19,6 +19,7 @@ cd %DOWNLOADS_DIR% git clone https://github.com/microsoft/vcpkg.git cd vcpkg call bootstrap-vcpkg.bat +echo "VCPKG Installed" :: install dependencies vcpkg install libjpeg-turbo:x64-windows --x-install-root=%DEPENDENCIES_DIR% diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 0136d10425..de7f892816 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -87,7 +87,6 @@ jobs: } else { throw "Invalid repository name: $repository_name" } - dir ${{ env.SRC_DIR }}\vision\dist echo "Test Print" dir ${{ env.SRC_DIR }}\dist - name: Upload Artifact From 4d9015da313d9c8ef2cd8b6467353fb43d9e1ae7 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:22:07 +0100 Subject: [PATCH 018/120] update print path --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index de7f892816..100cb2f26e 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -88,7 +88,7 @@ jobs: throw "Invalid repository name: $repository_name" } echo "Test Print" - dir ${{ env.SRC_DIR }}\dist + dir ${{ env.SRC_DIR }} - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 4c228e232eb6172f8d1327c87d354657cd107ced Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 3 Mar 2025 16:33:32 +0100 Subject: [PATCH 019/120] add more debugging --- .github/scripts/winx64test/build_vision.bat | 4 +++- .github/workflows/build_wheels_windows_x64_test.yml | 13 +++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index e42d4847e6..21467be3c5 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -1,3 +1,4 @@ +echo "Starting build_vision.bat" @echo on set SRC_PATH=%GITHUB_WORKSPACE%\%SRC_DIR% set CMAKE_BUILD_TYPE=%BUILD_TYPE% @@ -58,4 +59,5 @@ python setup.py bdist_wheel if %errorlevel% neq 0 ( echo "Failed on build_vision. (exitcode = %errorlevel%)" exit /b 1 -) \ No newline at end of file +) +echo Finished running build_vision.bat" \ No newline at end of file diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 100cb2f26e..ae3ef2360f 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -81,9 +81,18 @@ jobs: echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append if ($repository_name -eq "audio") { cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat + if ($?) { + echo "Done Building Torchaudio" + } else { + echo "Error: build_audio.bat failed" + } } elseif ($repository_name -eq "vision") { cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat - echo "Done Building Vision" + if ($?) { + echo "Done Building Audio" + } else { + echo "Error: build_audio.bat failed" + } } else { throw "Invalid repository name: $repository_name" } @@ -93,6 +102,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ env.repository_name }}-wheel - path: ${{ env.SRC_DIR }}\vision\dist\* + path: ${{ env.SRC_DIR }}\dist\* compression-level: 0 retention-days: 3 \ No newline at end of file From 463d419b62d1de4abfdd770997ebeacd56c249a9 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 09:59:42 +0100 Subject: [PATCH 020/120] update build commands --- .../build_wheels_windows_x64_test.yml | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index ae3ef2360f..15a41060cf 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -74,30 +74,32 @@ jobs: path: ${{ env.SRC_DIR }} submodules: recursive - name: Call Build Script - shell: pwsh + shell: bash run: | - $repository_name = "${{ inputs.repository_name }}".Split("/")[-1] # Extract 'audio' or 'vision' + repository_name=$(basename "${{ inputs.repository_name }}") # Extract 'audio' or 'vision' echo "$repository_name" - echo "repository_name=$repository_name" | Out-File -FilePath $env:GITHUB_ENV -Append - if ($repository_name -eq "audio") { - cmd //c ${{ env.SCRIPTS_DIR }}\build_audio.bat - if ($?) { - echo "Done Building Torchaudio" - } else { - echo "Error: build_audio.bat failed" - } - } elseif ($repository_name -eq "vision") { - cmd //c ${{ env.SCRIPTS_DIR }}\build_vision.bat - if ($?) { - echo "Done Building Audio" - } else { - echo "Error: build_audio.bat failed" - } - } else { - throw "Invalid repository name: $repository_name" - } + echo "repository_name=$repository_name" >> "$GITHUB_ENV" + + if [ "$repository_name" = "audio" ]; then + "${{ env.SCRIPTS_DIR }}/build_audio.bat" + if [ $? -eq 0 ]; then + echo "Done Building Torchaudio" + else + echo "Error: Build Torchaudio failed" + fi + elif [ "$repository_name" = "vision" ]; then + "${{ env.SCRIPTS_DIR }}/build_vision.bat" + if [ $? -eq 0 ]; then + echo "Done Building Torchvision" + else + echo "Error: Build Torchvision failed" + fi + else + echo "Invalid repository name: $repository_name" + exit 1 + fi echo "Test Print" - dir ${{ env.SRC_DIR }} + ls -l "${{ env.SRC_DIR }}" - name: Upload Artifact uses: actions/upload-artifact@v4 with: From c28b11e325a4d764d0e8fd39ad3af076abe7ff71 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:04:10 +0100 Subject: [PATCH 021/120] fix slashes --- .github/workflows/build_wheels_windows_x64_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 15a41060cf..126d1ed44d 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -81,14 +81,14 @@ jobs: echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - "${{ env.SCRIPTS_DIR }}/build_audio.bat" + "${{ env.SCRIPTS_DIR }}\build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else echo "Error: Build Torchaudio failed" fi elif [ "$repository_name" = "vision" ]; then - "${{ env.SCRIPTS_DIR }}/build_vision.bat" + "${{ env.SCRIPTS_DIR }}\build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From 7d9b069ec5b415eccc448f0a35f6a6c7393d949e Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:10:22 +0100 Subject: [PATCH 022/120] fix script calls --- .github/workflows/build_wheels_windows_x64_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 126d1ed44d..04695d640d 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -81,14 +81,14 @@ jobs: echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - "${{ env.SCRIPTS_DIR }}\build_audio.bat" + cmd //c "$SCRIPTS_DIR\\build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else echo "Error: Build Torchaudio failed" fi elif [ "$repository_name" = "vision" ]; then - "${{ env.SCRIPTS_DIR }}\build_vision.bat" + cmd //c "$SCRIPTS_DIR\\build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From b119236ad936a8a01f5a69d985d515f483b8afcc Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:15:08 +0100 Subject: [PATCH 023/120] fix scripts path --- .github/workflows/build_wheels_windows_x64_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 04695d640d..65ea8f5f73 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,12 +31,12 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: .github\scripts\winx64test\ + SCRIPTS_DIR: .\test-infra\.github\scripts\winx64test\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} BUILD_TYPE: ${{ inputs.build_type }} - BUILD_VERSION : ${{ inputs.torchaudio_build_version }} + BUILD_VERSION : ${{ inputs.build_version }} permissions: id-token: write From a5922730a7f215aec68f261235586fee14257bcf Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:21:00 +0100 Subject: [PATCH 024/120] Add debug prints --- .github/workflows/build_wheels_windows_x64_test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 65ea8f5f73..eefc9c42e4 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: .\test-infra\.github\scripts\winx64test\ + SCRIPTS_DIR: .test-infra\.github\scripts\winx64test\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -78,6 +78,8 @@ jobs: run: | repository_name=$(basename "${{ inputs.repository_name }}") # Extract 'audio' or 'vision' echo "$repository_name" + echo "$SCRIPTS_DIR" + ls -l "${{ env.SCRIPTS_DIR }}" echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then From 9e43873fa28099cbce09e929ca4c92167840cf01 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:26:07 +0100 Subject: [PATCH 025/120] update git shell commands --- .../workflows/build_wheels_windows_x64_test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index eefc9c42e4..db74ee8e41 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -76,32 +76,35 @@ jobs: - name: Call Build Script shell: bash run: | - repository_name=$(basename "${{ inputs.repository_name }}") # Extract 'audio' or 'vision' + repository_name=$(basename "$INPUT_REPOSITORY_NAME") # Extract audio or vision echo "$repository_name" echo "$SCRIPTS_DIR" - ls -l "${{ env.SCRIPTS_DIR }}" + ls -l "$SCRIPTS_DIR" echo "repository_name=$repository_name" >> "$GITHUB_ENV" - + if [ "$repository_name" = "audio" ]; then - cmd //c "$SCRIPTS_DIR\\build_audio.bat" + cmd //c "$SCRIPTS_DIR/build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else echo "Error: Build Torchaudio failed" + exit 1 fi elif [ "$repository_name" = "vision" ]; then - cmd //c "$SCRIPTS_DIR\\build_vision.bat" + cmd //c "$SCRIPTS_DIR/build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else echo "Error: Build Torchvision failed" + exit 1 fi else echo "Invalid repository name: $repository_name" exit 1 fi + echo "Test Print" - ls -l "${{ env.SRC_DIR }}" + ls -l "$SRC_DIR" - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 3b31cbf048354ec7acebb7bebd496514c2acfc72 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:34:45 +0100 Subject: [PATCH 026/120] add debug path step --- .../workflows/build_wheels_windows_x64_test.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index db74ee8e41..fb53237f57 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: .test-infra\.github\scripts\winx64test\ + SCRIPTS_DIR: .github\scripts\winx64test\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -47,6 +47,20 @@ jobs: runs-on: windows-latest name: Build wheel steps: + - name: Debug Paths + shell: bash + run: | + echo "Current Directory:" + pwd # Print current directory + + echo "Listing contents of current directory:" + ls -l + + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + + echo "Checking .test-infra/.github/scripts/winx64test directory explicitly:" + ls -l .test-infra/.github/scripts/winx64test || echo "Explicit path check failed" - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git From f13efc7248363bcf2906888036ab3da6d47b83cd Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:38:17 +0100 Subject: [PATCH 027/120] checkout test-infra changes --- .github/workflows/build_wheels_windows_x64_test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index fb53237f57..e46659fb83 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: .github\scripts\winx64test\ + SCRIPTS_DIR: test-infra\github\scripts\winx64test\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -47,6 +47,12 @@ jobs: runs-on: windows-latest name: Build wheel steps: + - name: Checkout test-infra repository + uses: actions/checkout@v4 + with: + repository: alinpahontu2912/test-infra # Replace with the actual org/user and repo name + ref: x64windows_test # Use the appropriate branch if needed + path: test-infra # This ensures the repo is cloned into a subfolder - name: Debug Paths shell: bash run: | @@ -60,7 +66,7 @@ jobs: ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" echo "Checking .test-infra/.github/scripts/winx64test directory explicitly:" - ls -l .test-infra/.github/scripts/winx64test || echo "Explicit path check failed" + ls -l test-infra/.github/scripts/winx64test || echo "Explicit path check failed" - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git From 520d9d09182c1fbbf4647eb91cd972ea98d8b250 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 10:53:25 +0100 Subject: [PATCH 028/120] fix scripts path --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index e46659fb83..f06619057e 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra\github\scripts\winx64test\ + SCRIPTS_DIR: .test-infra/.github/scripts/winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} From 15da107a9890bf686c132c4ea51904ce31ede8d6 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:00:34 +0100 Subject: [PATCH 029/120] update path --- .github/workflows/build_wheels_windows_x64_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index f06619057e..f9fa544ce6 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: .test-infra/.github/scripts/winx64test + SCRIPTS_DIR: test-infra\.github\scripts\winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -65,7 +65,7 @@ jobs: echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - echo "Checking .test-infra/.github/scripts/winx64test directory explicitly:" + echo "Checking test-infra/.github/scripts/winx64test directory explicitly:" ls -l test-infra/.github/scripts/winx64test || echo "Explicit path check failed" - name: Git checkout workflow uses: actions/checkout@v4 From 255068a322dac4b75314802cc63c2f16ccef1e99 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:12:18 +0100 Subject: [PATCH 030/120] update path --- .github/workflows/build_wheels_windows_x64_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index f9fa544ce6..8cdb266b54 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra\.github\scripts\winx64test + SCRIPTS_DIR: test-infra/.github/scripts/winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} From 31f5074830ee75444160f9e2dc6f107b0d307130 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:18:16 +0100 Subject: [PATCH 031/120] fix repository name extraction --- .github/workflows/build_wheels_windows_x64_test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 8cdb266b54..1fc0769866 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -96,12 +96,10 @@ jobs: - name: Call Build Script shell: bash run: | - repository_name=$(basename "$INPUT_REPOSITORY_NAME") # Extract audio or vision + repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision echo "$repository_name" - echo "$SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" echo "repository_name=$repository_name" >> "$GITHUB_ENV" - if [ "$repository_name" = "audio" ]; then cmd //c "$SCRIPTS_DIR/build_audio.bat" if [ $? -eq 0 ]; then @@ -122,8 +120,6 @@ jobs: echo "Invalid repository name: $repository_name" exit 1 fi - - echo "Test Print" ls -l "$SRC_DIR" - name: Upload Artifact uses: actions/upload-artifact@v4 From 1edb9abdd058921d9b1348c3756cc5aff48c31d5 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:21:05 +0100 Subject: [PATCH 032/120] debug print --- .github/workflows/build_wheels_windows_x64_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 1fc0769866..2efce74370 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra/.github/scripts/winx64test + SCRIPTS_DIR: test-infra\.github\scripts\winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -98,7 +98,10 @@ jobs: run: | repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision echo "$repository_name" - ls -l "$SCRIPTS_DIR" + + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then cmd //c "$SCRIPTS_DIR/build_audio.bat" From 431ca503c8f730ce5a52d9491eea42a641043acd Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:26:53 +0100 Subject: [PATCH 033/120] add more debugging --- .../workflows/build_wheels_windows_x64_test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 2efce74370..ad3dc3e0a0 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra\.github\scripts\winx64test + SCRIPTS_DIR: ${{ github.workspace }}/test-infra/.github/scripts/winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -71,13 +71,22 @@ jobs: uses: actions/checkout@v4 - name: Bootstrap Git run: | + SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat - name: Bootstrap Python run: | + SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat - name: Bootstrap Build Tools run: | - cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat + SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -99,6 +108,7 @@ jobs: repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision echo "$repository_name" + SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" From 9aef78fd0e78f529c6ed78e6bf0e4dfcc4e46eb2 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:29:39 +0100 Subject: [PATCH 034/120] set bash shell --- .github/workflows/build_wheels_windows_x64_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index ad3dc3e0a0..7aff0713db 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -70,18 +70,21 @@ jobs: - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git + shell: bash run: | SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat - name: Bootstrap Python + shell: bash run: | SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat - name: Bootstrap Build Tools + shell: bash run: | SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" From 8c0536e0d17a297b9539f382a8da3dee064583ce Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:34:30 +0100 Subject: [PATCH 035/120] test hardcode dir path --- .github/workflows/build_wheels_windows_x64_test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 7aff0713db..f9bff82d06 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -75,21 +75,21 @@ jobs: SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_git.bat + cmd /c test-infra/.github/scripts/winx64test/bootstrap_git.bat - name: Bootstrap Python shell: bash run: | SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_python.bat + cmd /c test-infra/.github/scripts/winx64test/bootstrap_python.bat - name: Bootstrap Build Tools shell: bash run: | SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c ${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat + cmd /c test-infra/.github/scripts/winx64test/bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -117,7 +117,7 @@ jobs: echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - cmd //c "$SCRIPTS_DIR/build_audio.bat" + cmd //c "test-infra/.github/scripts/winx64test/build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else @@ -125,7 +125,7 @@ jobs: exit 1 fi elif [ "$repository_name" = "vision" ]; then - cmd //c "$SCRIPTS_DIR/build_vision.bat" + cmd //c "test-infra/.github/scripts/winx64test/build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From f605dc07d8b3dd4cd40daf761f30e0635543b371 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:40:44 +0100 Subject: [PATCH 036/120] test --- .../workflows/build_wheels_windows_x64_test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index f9bff82d06..4bce2edd98 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: ${{ github.workspace }}/test-infra/.github/scripts/winx64test + SCRIPTS_DIR: test-infra/.github/scripts/winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -72,24 +72,22 @@ jobs: - name: Bootstrap Git shell: bash run: | - SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') - echo "SCRIPTS_DIR: $SCRIPTS_DIR" + cmd /c test-infra/.github/scripts/winx64test/bootstrap_git.bat ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd /c test-infra/.github/scripts/winx64test/bootstrap_git.bat - name: Bootstrap Python shell: bash run: | + cmd /c test-infra/.github/scripts/winx64test/bootstrap_python.bat SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd /c test-infra/.github/scripts/winx64test/bootstrap_python.bat - name: Bootstrap Build Tools shell: bash run: | + cmd /c test-infra/.github/scripts/winx64test/bootstrap_buildtools.bat SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd /c test-infra/.github/scripts/winx64test/bootstrap_buildtools.bat # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -117,7 +115,7 @@ jobs: echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - cmd //c "test-infra/.github/scripts/winx64test/build_audio.bat" + cmd //c "test-infra//.github//scripts//winx64test//build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else @@ -125,7 +123,7 @@ jobs: exit 1 fi elif [ "$repository_name" = "vision" ]; then - cmd //c "test-infra/.github/scripts/winx64test/build_vision.bat" + cmd //c "test-infra//.github//scripts//winx64test//build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From 07ea1510ae9fd1da3939669729897a22eb330aec Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:46:44 +0100 Subject: [PATCH 037/120] test new path --- .../build_wheels_windows_x64_test.yml | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 4bce2edd98..8858ee05e1 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra/.github/scripts/winx64test + SCRIPTS_DIR: test-infra\.github\scripts\winx64test\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -50,9 +50,9 @@ jobs: - name: Checkout test-infra repository uses: actions/checkout@v4 with: - repository: alinpahontu2912/test-infra # Replace with the actual org/user and repo name - ref: x64windows_test # Use the appropriate branch if needed - path: test-infra # This ensures the repo is cloned into a subfolder + repository: alinpahontu2912/test-infra + ref: x64windows_test + path: test-infra - name: Debug Paths shell: bash run: | @@ -65,29 +65,27 @@ jobs: echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - echo "Checking test-infra/.github/scripts/winx64test directory explicitly:" - ls -l test-infra/.github/scripts/winx64test || echo "Explicit path check failed" + echo "Checking test-infra\.github\scripts\winx64test\ directory explicitly:" + ls -l test-infra\.github\scripts\winx64test\ || echo "Explicit path check failed" + - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git shell: bash run: | - cmd /c test-infra/.github/scripts/winx64test/bootstrap_git.bat + echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_git.bat" - name: Bootstrap Python - shell: bash run: | - cmd /c test-infra/.github/scripts/winx64test/bootstrap_python.bat - SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_python.bat" - name: Bootstrap Build Tools - shell: bash run: | - cmd /c test-infra/.github/scripts/winx64test/bootstrap_buildtools.bat - SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat" # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 @@ -109,13 +107,12 @@ jobs: repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision echo "$repository_name" - SCRIPTS_DIR=$(echo "$SCRIPTS_DIR" | sed 's|\\|/|g') echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - cmd //c "test-infra//.github//scripts//winx64test//build_audio.bat" + cmd //c "$SCRIPTS_DIR/build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else @@ -123,7 +120,7 @@ jobs: exit 1 fi elif [ "$repository_name" = "vision" ]; then - cmd //c "test-infra//.github//scripts//winx64test//build_vision.bat" + cmd //c "$SCRIPTS_DIR/build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From 4cfff7dc80e37004ef8338aec401e355a7665664 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:50:24 +0100 Subject: [PATCH 038/120] slashes test --- .github/workflows/build_wheels_windows_x64_test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 8858ee05e1..a22b12909d 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra\.github\scripts\winx64test\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test\\ SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -65,9 +65,9 @@ jobs: echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - echo "Checking test-infra\.github\scripts\winx64test\ directory explicitly:" - ls -l test-infra\.github\scripts\winx64test\ || echo "Explicit path check failed" - + echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + ls -l test-infra\\.github\\scripts\winx64test\\ || echo "Explicit path check failed" + - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git @@ -76,6 +76,7 @@ jobs: echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_git.bat" + cmd //c "test-infra\\.github\\scripts\winx64test\\bootstrap_git.bat" - name: Bootstrap Python run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" From c12f43e0f4e67b2e82770e1e81086fb738b1df55 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 11:54:38 +0100 Subject: [PATCH 039/120] test --- .../build_wheels_windows_x64_test.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index a22b12909d..ddaf598dec 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test\\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} @@ -56,18 +56,11 @@ jobs: - name: Debug Paths shell: bash run: | - echo "Current Directory:" - pwd # Print current directory - - echo "Listing contents of current directory:" - ls -l - echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - ls -l test-infra\\.github\\scripts\winx64test\\ || echo "Explicit path check failed" - + ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git @@ -75,18 +68,18 @@ jobs: run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_git.bat" - cmd //c "test-infra\\.github\\scripts\winx64test\\bootstrap_git.bat" + cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" + cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" - name: Bootstrap Python run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_python.bat" + cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_python.bat" - name: Bootstrap Build Tools run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.bat" + cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_buildtools.bat" # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 From 9ed5e1d6322696de856af3436e5d816eafd0bf23 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:21:08 +0100 Subject: [PATCH 040/120] test debug script --- .github/workflows/build_wheels_windows_x64_test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index ddaf598dec..16913815ee 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -61,6 +61,12 @@ jobs: echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" + + cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" + cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_python.bat" + cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_buildtools.bat" + cmd //c "test-infra\\.github\\scripts\\winx64test\\build_vision.bat" + - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git From 2f330ce02989bdb6cf5b3b58638783ea3fa4da5f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:24:32 +0100 Subject: [PATCH 041/120] test script --- .../build_wheels_windows_x64_test.yml | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 16913815ee..33a0f2691a 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -61,30 +61,29 @@ jobs: echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" - cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_python.bat" - cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_buildtools.bat" - cmd //c "test-infra\\.github\\scripts\\winx64test\\build_vision.bat" - - name: Git checkout workflow uses: actions/checkout@v4 - name: Bootstrap Git shell: bash run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" + - name: Bootstrap Git 2 test + shell: bash + run: | + cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" + # echo "SCRIPTS_DIR: $SCRIPTS_DIR" + # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + # cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" + # cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" - name: Bootstrap Python run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + # echo "SCRIPTS_DIR: $SCRIPTS_DIR" + # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_python.bat" - name: Bootstrap Build Tools run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + # echo "SCRIPTS_DIR: $SCRIPTS_DIR" + # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_buildtools.bat" # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact From 8cfb3f7a86c1ad30b64e437be57a3808ab70acb7 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:27:54 +0100 Subject: [PATCH 042/120] test --- .../workflows/build_wheels_windows_x64_test.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 33a0f2691a..f6936acf79 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -53,7 +53,17 @@ jobs: repository: alinpahontu2912/test-infra ref: x64windows_test path: test-infra - - name: Debug Paths + # - name: Debug Paths + # shell: bash + # run: | + # echo "SCRIPTS_DIR: $SCRIPTS_DIR" + # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + + # echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + # ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" + - name: Git checkout workflow + uses: actions/checkout@v4 + - name: Bootstrap Git shell: bash run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" @@ -61,11 +71,6 @@ jobs: echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - name: Git checkout workflow - uses: actions/checkout@v4 - - name: Bootstrap Git - shell: bash - run: | cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" - name: Bootstrap Git 2 test shell: bash From 448af36708040d25a0f29336c21814ad71ef0a67 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:31:14 +0100 Subject: [PATCH 043/120] change ops order --- .../build_wheels_windows_x64_test.yml | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index f6936acf79..2f0ee6b8a8 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -47,22 +47,22 @@ jobs: runs-on: windows-latest name: Build wheel steps: + - name: Git checkout workflow + uses: actions/checkout@v4 - name: Checkout test-infra repository uses: actions/checkout@v4 with: repository: alinpahontu2912/test-infra ref: x64windows_test path: test-infra - # - name: Debug Paths - # shell: bash - # run: | - # echo "SCRIPTS_DIR: $SCRIPTS_DIR" - # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + - name: Debug Paths + shell: bash + run: | + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - # echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - # ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - name: Git checkout workflow - uses: actions/checkout@v4 + echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - name: Bootstrap Git shell: bash run: | @@ -71,7 +71,7 @@ jobs: echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" + cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" - name: Bootstrap Git 2 test shell: bash run: | From 8bb3daa7d428d3a59214dfee23cd31fbee24ae82 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:47:10 +0100 Subject: [PATCH 044/120] change to cmd shell and minor updates --- .../build_wheels_windows_x64_test.yml | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 2f0ee6b8a8..f1241f4c77 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -63,33 +63,25 @@ jobs: echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - name: Bootstrap Git - shell: bash - run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - - echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" - - name: Bootstrap Git 2 test - shell: bash + + echo "SRC_DIR: $SRC_DIR" + ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + + - name: Run Bootstrap Git Script + shell: cmd run: | - cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" - # echo "SCRIPTS_DIR: $SCRIPTS_DIR" - # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - # cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_git.bat" - # cmd //c "test-infra\\.github\\scripts\\winx64test\\bootstrap_git.bat" + echo Running bootstrap_git.bat... + "%SCRIPTS_DIR%\bootstrap_git.bat" - name: Bootstrap Python + shell: cmd run: | - # echo "SCRIPTS_DIR: $SCRIPTS_DIR" - # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_python.bat" + echo Running bootstrap_python.bat... + "%SCRIPTS_DIR%\bootstrap_python.bat" - name: Bootstrap Build Tools + shell: cmd run: | - # echo "SCRIPTS_DIR: $SCRIPTS_DIR" - # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - cmd //c "${{ env.SCRIPTS_DIR }}\\bootstrap_buildtools.bat" + echo Running bootstrap_buildtools.bat... + "%SCRIPTS_DIR%\bootstrap_buildtools.bat" # TODO This should not be needed, update it when tested # - name: Download PyTorch wheel artifact # uses: actions/download-artifact@v4 From f065c87daed1bf49808a138db1b914507335a4e8 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:51:40 +0100 Subject: [PATCH 045/120] test remove infra dir --- .github/workflows/build_wheels_windows_x64_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index f1241f4c77..a54a283158 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -49,7 +49,6 @@ jobs: steps: - name: Git checkout workflow uses: actions/checkout@v4 - - name: Checkout test-infra repository uses: actions/checkout@v4 with: repository: alinpahontu2912/test-infra From 102cac4864f73eb5d572ca12a08fdd7bb58110a8 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:52:47 +0100 Subject: [PATCH 046/120] fix typo --- .github/workflows/build_wheels_windows_x64_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index a54a283158..284c75c021 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -48,7 +48,6 @@ jobs: name: Build wheel steps: - name: Git checkout workflow - uses: actions/checkout@v4 uses: actions/checkout@v4 with: repository: alinpahontu2912/test-infra From 0b8a6d5276800a74a3d37f0d0d5d004bbc6baad4 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 13:55:59 +0100 Subject: [PATCH 047/120] test --- .../build_wheels_windows_x64_test.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 284c75c021..1433c6de10 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -49,11 +49,27 @@ jobs: steps: - name: Git checkout workflow uses: actions/checkout@v4 + - name: Debug Paths 1 + shell: bash + run: | + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + + echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" + + echo "SRC_DIR: $SRC_DIR" + ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + + ls -l src\\pytorch\\vision + + - name: Checkout test-infra repository + uses: actions/checkout@v4 with: repository: alinpahontu2912/test-infra ref: x64windows_test path: test-infra - - name: Debug Paths + - name: Debug Paths 2 shell: bash run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" From 34fc48d86f8142847552b39281adf74eabe544c5 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 14:42:58 +0100 Subject: [PATCH 048/120] update checkout paths --- .../build_wheels_windows_x64_test.yml | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 1433c6de10..438f66434e 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -17,9 +17,9 @@ on: required: false default: "latest" type: string - # pytorch_build_run_id: - # required: true - # type: string + pytorch_build_run_id: + required: false + type: string build_type: required: false default: "Release" @@ -32,7 +32,7 @@ env: DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: src\${{ inputs.repository_name }} + SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} MSVC_VERSION: ${{ inputs.msvc_version }} BUILD_TYPE: ${{ inputs.build_type }} @@ -47,28 +47,19 @@ jobs: runs-on: windows-latest name: Build wheel steps: - - name: Git checkout workflow - uses: actions/checkout@v4 - - name: Debug Paths 1 - shell: bash - run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - - echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - echo "SRC_DIR: $SRC_DIR" - ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" - - ls -l src\\pytorch\\vision - - - name: Checkout test-infra repository + - name: Checkout test-infra Repository uses: actions/checkout@v4 with: - repository: alinpahontu2912/test-infra + repository: alinpahontu2912/test-infra ref: x64windows_test path: test-infra + - name: Checkout Target Repository (${{ inputs.repository_name }}) + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository_name }} + ref: ${{ inputs.repository_branch }} + path: src/${{ inputs.repository_name }} # Stores it in 'src/{repository_name}/' + submodules: recursive - name: Debug Paths 2 shell: bash run: | @@ -81,6 +72,9 @@ jobs: echo "SRC_DIR: $SRC_DIR" ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + echo "Checking src\\pytorch\\vision directory explicitly:" + ls -l src\\pytorch\\vision || echo "Explicit path check failed" + - name: Run Bootstrap Git Script shell: cmd run: | From 3e36f84cf9e49ebff8caec1129fe839341685d7d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 14:50:21 +0100 Subject: [PATCH 049/120] update bootstrap_git script --- .github/scripts/winx64test/bootstrap_git.bat | 28 +++++++++++++------ .../build_wheels_windows_x64_test.yml | 6 ++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/scripts/winx64test/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat index 5d3d511afc..9ef495d42a 100644 --- a/.github/scripts/winx64test/bootstrap_git.bat +++ b/.github/scripts/winx64test/bootstrap_git.bat @@ -1,20 +1,30 @@ :: we need to install newer version of Git manually as "-submodules" function is not supported in the default version of runner. @echo off +setlocal enabledelayedexpansion echo Dependency Git installation started. :: Pre-check for downloads and dependencies folders -if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% -if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% +set "DOWNLOADS_DIR=c:\temp\downloads" +set "DEPENDENCIES_DIR=c:\temp\dependencies" + +if not exist "%DOWNLOADS_DIR%" mkdir "%DOWNLOADS_DIR%" +if not exist "%DEPENDENCIES_DIR%" mkdir "%DEPENDENCIES_DIR%" :: Set download URL for the Git -set DOWNLOAD_URL="https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" -set INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe +set "DOWNLOAD_URL=https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" +set "INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe" :: Download installer echo Downloading Git... -curl -L -o "%INSTALLER_FILE%" %DOWNLOAD_URL% +curl -L -o "%INSTALLER_FILE%" "%DOWNLOAD_URL%" + +:: Verify download success +if not exist "%INSTALLER_FILE%" ( + echo "Failed to download Git!" + exit /b 1 +) :: Install Git echo Installing Git... @@ -31,7 +41,9 @@ if %errorlevel% neq 0 ( :: Enable long paths call "%DEPENDENCIES_DIR%\git\cmd\git.exe" config --system core.longpaths true -:: Add to PATH -echo %DEPENDENCIES_DIR%\git\cmd\;%DEPENDENCIES_DIR%\git\bin\>> %GITHUB_PATH% +:: Add Git to PATH +echo %DEPENDENCIES_DIR%\git\cmd\; >> "%GITHUB_PATH%" +echo %DEPENDENCIES_DIR%\git\bin\; >> "%GITHUB_PATH%" -echo Dependency Git installation finished. \ No newline at end of file +echo Dependency Git installation finished. +exit /b 0 \ No newline at end of file diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 438f66434e..d1e5f0e34c 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -29,8 +29,8 @@ on: type: string env: - DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} - DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} + DOWNLOADS_DIR: c:\\temp\\downloads\\${{ inputs.repository_name }} + DEPENDENCIES_DIR: c:\\temp\\dependencies\\${{ inputs.repository_name }} SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} @@ -60,7 +60,7 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} # Stores it in 'src/{repository_name}/' submodules: recursive - - name: Debug Paths 2 + - name: Debug Paths shell: bash run: | echo "SCRIPTS_DIR: $SCRIPTS_DIR" From 4945fc22353be9a606de05ad72a8e58fafb4c52f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:01:37 +0100 Subject: [PATCH 050/120] test git bootstrap script --- .github/scripts/winx64test/bootstrap_git.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/scripts/winx64test/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat index 9ef495d42a..c7311448b3 100644 --- a/.github/scripts/winx64test/bootstrap_git.bat +++ b/.github/scripts/winx64test/bootstrap_git.bat @@ -28,7 +28,10 @@ if not exist "%INSTALLER_FILE%" ( :: Install Git echo Installing Git... -"%INSTALLER_FILE%" /VERYSILENT /DIR="%DEPENDENCIES_DIR%\git" + +echo %INSTALLER_FILE% + +%INSTALLER_FILE% /VERYSILENT /NORESTART /DIR="%DEPENDENCIES_DIR%\git" dir %DEPENDENCIES_DIR%\git From c5222207ffe9492b6cd51c0d2c3903b1b2c076f3 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:20:37 +0100 Subject: [PATCH 051/120] update path test --- .github/scripts/winx64test/bootstrap_git.bat | 34 ++++++------------- .../build_wheels_windows_x64_test.yml | 4 +-- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/scripts/winx64test/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat index c7311448b3..d291b4f817 100644 --- a/.github/scripts/winx64test/bootstrap_git.bat +++ b/.github/scripts/winx64test/bootstrap_git.bat @@ -1,37 +1,25 @@ :: we need to install newer version of Git manually as "-submodules" function is not supported in the default version of runner. @echo off -setlocal enabledelayedexpansion echo Dependency Git installation started. :: Pre-check for downloads and dependencies folders -set "DOWNLOADS_DIR=c:\temp\downloads" -set "DEPENDENCIES_DIR=c:\temp\dependencies" - -if not exist "%DOWNLOADS_DIR%" mkdir "%DOWNLOADS_DIR%" -if not exist "%DEPENDENCIES_DIR%" mkdir "%DEPENDENCIES_DIR%" +if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% +if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% :: Set download URL for the Git -set "DOWNLOAD_URL=https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" -set "INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe" +set DOWNLOAD_URL="https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" +set INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe :: Download installer echo Downloading Git... -curl -L -o "%INSTALLER_FILE%" "%DOWNLOAD_URL%" - -:: Verify download success -if not exist "%INSTALLER_FILE%" ( - echo "Failed to download Git!" - exit /b 1 -) +curl -L -o "%INSTALLER_FILE%" %DOWNLOAD_URL% :: Install Git echo Installing Git... - -echo %INSTALLER_FILE% - -%INSTALLER_FILE% /VERYSILENT /NORESTART /DIR="%DEPENDENCIES_DIR%\git" +"%INSTALLER_FILE%" /VERYSILENT /NORESTART /DIR="%DEPENDENCIES_DIR%\git" +echo Git installed to %DEPENDENCIES_DIR%\git dir %DEPENDENCIES_DIR%\git @@ -44,9 +32,7 @@ if %errorlevel% neq 0 ( :: Enable long paths call "%DEPENDENCIES_DIR%\git\cmd\git.exe" config --system core.longpaths true -:: Add Git to PATH -echo %DEPENDENCIES_DIR%\git\cmd\; >> "%GITHUB_PATH%" -echo %DEPENDENCIES_DIR%\git\bin\; >> "%GITHUB_PATH%" +:: Add to PATH +echo %DEPENDENCIES_DIR%\git\cmd\;%DEPENDENCIES_DIR%\git\bin\>> %GITHUB_PATH% -echo Dependency Git installation finished. -exit /b 0 \ No newline at end of file +echo Dependency Git installation finished. \ No newline at end of file diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index d1e5f0e34c..6869dea87e 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -29,8 +29,8 @@ on: type: string env: - DOWNLOADS_DIR: c:\\temp\\downloads\\${{ inputs.repository_name }} - DEPENDENCIES_DIR: c:\\temp\\dependencies\\${{ inputs.repository_name }} + DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} + DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} From 48300774aee25b97c7f909d9ef37b7d978291784 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:32:21 +0100 Subject: [PATCH 052/120] change dependenceis/downoads path --- .github/scripts/winx64test/bootstrap_git.bat | 38 +++++++++++-------- .../build_wheels_windows_x64_test.yml | 4 +- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/scripts/winx64test/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat index d291b4f817..5a190f9dcb 100644 --- a/.github/scripts/winx64test/bootstrap_git.bat +++ b/.github/scripts/winx64test/bootstrap_git.bat @@ -1,38 +1,44 @@ -:: we need to install newer version of Git manually as "-submodules" function is not supported in the default version of runner. - @echo off +setlocal enabledelayedexpansion echo Dependency Git installation started. :: Pre-check for downloads and dependencies folders -if not exist "%DOWNLOADS_DIR%" mkdir %DOWNLOADS_DIR% -if not exist "%DEPENDENCIES_DIR%" mkdir %DEPENDENCIES_DIR% +set "DOWNLOADS_DIR=c:\temp\downloads" +set "DEPENDENCIES_DIR=c:\temp\dependencies" + +if not exist "%DOWNLOADS_DIR%" mkdir "%DOWNLOADS_DIR%" +if not exist "%DEPENDENCIES_DIR%" mkdir "%DEPENDENCIES_DIR%" :: Set download URL for the Git -set DOWNLOAD_URL="https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" -set INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe +set "DOWNLOAD_URL=https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" +set "INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe" :: Download installer echo Downloading Git... -curl -L -o "%INSTALLER_FILE%" %DOWNLOAD_URL% +curl -L -o "%INSTALLER_FILE%" "%DOWNLOAD_URL%" + +:: Verify download success +if not exist "%INSTALLER_FILE%" ( + echo Failed to download Git! + exit /b 1 +) :: Install Git echo Installing Git... -"%INSTALLER_FILE%" /VERYSILENT /NORESTART /DIR="%DEPENDENCIES_DIR%\git" -echo Git installed to %DEPENDENCIES_DIR%\git - -dir %DEPENDENCIES_DIR%\git +"%INSTALLER_FILE%" /VERYSILENT /DIR="%DEPENDENCIES_DIR%\git" -:: Check if installation was successful +:: Verify installation success if %errorlevel% neq 0 ( - echo "Failed to install Git. (exitcode = %errorlevel%)" + echo Failed to install Git. (exitcode = %errorlevel%) exit /b 1 ) :: Enable long paths call "%DEPENDENCIES_DIR%\git\cmd\git.exe" config --system core.longpaths true -:: Add to PATH -echo %DEPENDENCIES_DIR%\git\cmd\;%DEPENDENCIES_DIR%\git\bin\>> %GITHUB_PATH% +:: Add Git to PATH (temporary for this session) +set "PATH=%DEPENDENCIES_DIR%\git\cmd\;%DEPENDENCIES_DIR%\git\bin\;%PATH%" -echo Dependency Git installation finished. \ No newline at end of file +echo Dependency Git installation finished. +exit /b 0 \ No newline at end of file diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 6869dea87e..76fc851954 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -29,8 +29,8 @@ on: type: string env: - DOWNLOADS_DIR: c:\temp\downloads\${{ inputs.repository_name }} - DEPENDENCIES_DIR: c:\temp\dependencies\${{ inputs.repository_name }} + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} From 825e041834d21dd18b83b90ee48f608614535b01 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:44:12 +0100 Subject: [PATCH 053/120] test change env variables --- .../build_wheels_windows_x64_test.yml | 79 ++++++++++--------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 76fc851954..bf69db4ce0 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -28,16 +28,6 @@ on: required: false type: string -env: - DOWNLOADS_DIR: c:\temp\downloads\ - DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: src\\${{ inputs.repository_name }} - PYTHON_VERSION: ${{ inputs.python_version }} - MSVC_VERSION: ${{ inputs.msvc_version }} - BUILD_TYPE: ${{ inputs.build_type }} - BUILD_VERSION : ${{ inputs.build_version }} - permissions: id-token: write contents: read @@ -47,6 +37,17 @@ jobs: runs-on: windows-latest name: Build wheel steps: + - name: Set up environment variables + id: env_vars + run: | + echo "DOWNLOADS_DIR=c:\\temp\\downloads\\$(basename '${{ inputs.repository_name }}')" >> $GITHUB_ENV + echo "DEPENDENCIES_DIR=c:\\temp\\dependencies\\$(basename '${{ inputs.repository_name }}')" >> $GITHUB_ENV + echo "SRC_DIR=src\\${{ inputs.repository_name }}" >> $GITHUB_ENV + echo "SCRIPTS_DIR=test-infra\\.github\\scripts\\winx64test" >> $GITHUB_ENV + echo "PYTHON_VERSION=${{ inputs.python_version }}" >> $GITHUB_ENV + echo "MSVC_VERSION=${{ inputs.msvc_version }}" >> $GITHUB_ENV + echo "BUILD_TYPE=${{ inputs.build_type }}" >> $GITHUB_ENV + echo "BUILD_VERSION=${{ inputs.build_version }}" >> $GITHUB_ENV - name: Checkout test-infra Repository uses: actions/checkout@v4 with: @@ -75,36 +76,36 @@ jobs: echo "Checking src\\pytorch\\vision directory explicitly:" ls -l src\\pytorch\\vision || echo "Explicit path check failed" - - name: Run Bootstrap Git Script - shell: cmd - run: | - echo Running bootstrap_git.bat... - "%SCRIPTS_DIR%\bootstrap_git.bat" - - name: Bootstrap Python - shell: cmd - run: | - echo Running bootstrap_python.bat... - "%SCRIPTS_DIR%\bootstrap_python.bat" - - name: Bootstrap Build Tools - shell: cmd - run: | - echo Running bootstrap_buildtools.bat... - "%SCRIPTS_DIR%\bootstrap_buildtools.bat" - # TODO This should not be needed, update it when tested - # - name: Download PyTorch wheel artifact - # uses: actions/download-artifact@v4 + # - name: Run Bootstrap Git Script + # shell: cmd + # run: | + # echo Running bootstrap_git.bat... + # "%SCRIPTS_DIR%\bootstrap_git.bat" + # - name: Bootstrap Python + # shell: cmd + # run: | + # echo Running bootstrap_python.bat... + # "%SCRIPTS_DIR%\bootstrap_python.bat" + # - name: Bootstrap Build Tools + # shell: cmd + # run: | + # echo Running bootstrap_buildtools.bat... + # "%SCRIPTS_DIR%\bootstrap_buildtools.bat" + # # TODO This should not be needed, update it when tested + # # - name: Download PyTorch wheel artifact + # # uses: actions/download-artifact@v4 + # # with: + # # github-token: ${{ secrets.GITHUB_TOKEN }} + # # run-id: ${{ inputs.pytorch_build_run_id }} + # # name: ${{ inputs.pytorch_build_artifact_name }} + # # path: ${{ env.DOWNLOADS_DIR }} + # - name: Git checkout repo ${{ inputs.repository_name }} + # uses: actions/checkout@v4 # with: - # github-token: ${{ secrets.GITHUB_TOKEN }} - # run-id: ${{ inputs.pytorch_build_run_id }} - # name: ${{ inputs.pytorch_build_artifact_name }} - # path: ${{ env.DOWNLOADS_DIR }} - - name: Git checkout repo ${{ inputs.repository_name }} - uses: actions/checkout@v4 - with: - repository: ${{ inputs.repository_name }} - ref: ${{ inputs.repository_branch }} - path: ${{ env.SRC_DIR }} - submodules: recursive + # repository: ${{ inputs.repository_name }} + # ref: ${{ inputs.repository_branch }} + # path: ${{ env.SRC_DIR }} + # submodules: recursive - name: Call Build Script shell: bash run: | From 78693cd3e1d4756deba65f92009e6d8073d18f85 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:47:56 +0100 Subject: [PATCH 054/120] test build script --- .../build_wheels_windows_x64_test.yml | 53 ++++++++----------- 1 file changed, 22 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index bf69db4ce0..ad3a30f0d6 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -28,6 +28,16 @@ on: required: false type: string +env: + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SRC_DIR: src\\${{ inputs.repository_name }} + PYTHON_VERSION: ${{ inputs.python_version }} + MSVC_VERSION: ${{ inputs.msvc_version }} + BUILD_TYPE: ${{ inputs.build_type }} + BUILD_VERSION : ${{ inputs.build_version }} + permissions: id-token: write contents: read @@ -37,17 +47,6 @@ jobs: runs-on: windows-latest name: Build wheel steps: - - name: Set up environment variables - id: env_vars - run: | - echo "DOWNLOADS_DIR=c:\\temp\\downloads\\$(basename '${{ inputs.repository_name }}')" >> $GITHUB_ENV - echo "DEPENDENCIES_DIR=c:\\temp\\dependencies\\$(basename '${{ inputs.repository_name }}')" >> $GITHUB_ENV - echo "SRC_DIR=src\\${{ inputs.repository_name }}" >> $GITHUB_ENV - echo "SCRIPTS_DIR=test-infra\\.github\\scripts\\winx64test" >> $GITHUB_ENV - echo "PYTHON_VERSION=${{ inputs.python_version }}" >> $GITHUB_ENV - echo "MSVC_VERSION=${{ inputs.msvc_version }}" >> $GITHUB_ENV - echo "BUILD_TYPE=${{ inputs.build_type }}" >> $GITHUB_ENV - echo "BUILD_VERSION=${{ inputs.build_version }}" >> $GITHUB_ENV - name: Checkout test-infra Repository uses: actions/checkout@v4 with: @@ -59,23 +58,22 @@ jobs: with: repository: ${{ inputs.repository_name }} ref: ${{ inputs.repository_branch }} - path: src/${{ inputs.repository_name }} # Stores it in 'src/{repository_name}/' + path: src/${{ inputs.repository_name }} submodules: recursive - - name: Debug Paths - shell: bash - run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + # - name: Debug Paths + # shell: bash + # run: | + # echo "SCRIPTS_DIR: $SCRIPTS_DIR" + # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - echo "SRC_DIR: $SRC_DIR" - ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + # echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + # ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - echo "Checking src\\pytorch\\vision directory explicitly:" - ls -l src\\pytorch\\vision || echo "Explicit path check failed" + # echo "SRC_DIR: $SRC_DIR" + # ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + # echo "Checking src\\pytorch\\vision directory explicitly:" + # ls -l src\\pytorch\\vision || echo "Explicit path check failed" # - name: Run Bootstrap Git Script # shell: cmd # run: | @@ -99,13 +97,6 @@ jobs: # # run-id: ${{ inputs.pytorch_build_run_id }} # # name: ${{ inputs.pytorch_build_artifact_name }} # # path: ${{ env.DOWNLOADS_DIR }} - # - name: Git checkout repo ${{ inputs.repository_name }} - # uses: actions/checkout@v4 - # with: - # repository: ${{ inputs.repository_name }} - # ref: ${{ inputs.repository_branch }} - # path: ${{ env.SRC_DIR }} - # submodules: recursive - name: Call Build Script shell: bash run: | From 711505c123d8d95bc56a765f2f0b3aa3cff70549 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 15:51:44 +0100 Subject: [PATCH 055/120] change shell to cmd --- .../build_wheels_windows_x64_test.yml | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index ad3a30f0d6..4db790cb9a 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -98,36 +98,38 @@ jobs: # # name: ${{ inputs.pytorch_build_artifact_name }} # # path: ${{ env.DOWNLOADS_DIR }} - name: Call Build Script - shell: bash + shell: cmd run: | - repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision - echo "$repository_name" + set repository_name=%~n1 # Extract audio or vision from input repository_name + echo %repository_name% - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - - echo "repository_name=$repository_name" >> "$GITHUB_ENV" - if [ "$repository_name" = "audio" ]; then - cmd //c "$SCRIPTS_DIR/build_audio.bat" - if [ $? -eq 0 ]; then - echo "Done Building Torchaudio" - else - echo "Error: Build Torchaudio failed" - exit 1 - fi - elif [ "$repository_name" = "vision" ]; then - cmd //c "$SCRIPTS_DIR/build_vision.bat" - if [ $? -eq 0 ]; then - echo "Done Building Torchvision" - else - echo "Error: Build Torchvision failed" - exit 1 - fi - else - echo "Invalid repository name: $repository_name" - exit 1 - fi - ls -l "$SRC_DIR" + echo SCRIPTS_DIR: %SCRIPTS_DIR% + dir "%SCRIPTS_DIR%" || echo SCRIPTS_DIR does not exist + + echo repository_name=%repository_name% >> %GITHUB_ENV% + + if "%repository_name%" == "audio" ( + call "%SCRIPTS_DIR%\build_audio.bat" + if %errorlevel% equ 0 ( + echo Done Building Torchaudio + ) else ( + echo Error: Build Torchaudio failed + exit /b 1 + ) + ) else if "%repository_name%" == "vision" ( + call "%SCRIPTS_DIR%\build_vision.bat" + if %errorlevel% equ 0 ( + echo Done Building Torchvision + ) else ( + echo Error: Build Torchvision failed + exit /b 1 + ) + ) else ( + echo Invalid repository name: %repository_name% + exit /b 1 + ) + + dir "%SRC_DIR%" - name: Upload Artifact uses: actions/upload-artifact@v4 with: From c46e76cba81dcaeb7f3d91c758804148cf51f12d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 16:03:57 +0100 Subject: [PATCH 056/120] test --- .../build_wheels_windows_x64_test.yml | 58 +++++++++---------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 4db790cb9a..ad3a30f0d6 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -98,38 +98,36 @@ jobs: # # name: ${{ inputs.pytorch_build_artifact_name }} # # path: ${{ env.DOWNLOADS_DIR }} - name: Call Build Script - shell: cmd + shell: bash run: | - set repository_name=%~n1 # Extract audio or vision from input repository_name - echo %repository_name% + repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision + echo "$repository_name" - echo SCRIPTS_DIR: %SCRIPTS_DIR% - dir "%SCRIPTS_DIR%" || echo SCRIPTS_DIR does not exist - - echo repository_name=%repository_name% >> %GITHUB_ENV% - - if "%repository_name%" == "audio" ( - call "%SCRIPTS_DIR%\build_audio.bat" - if %errorlevel% equ 0 ( - echo Done Building Torchaudio - ) else ( - echo Error: Build Torchaudio failed - exit /b 1 - ) - ) else if "%repository_name%" == "vision" ( - call "%SCRIPTS_DIR%\build_vision.bat" - if %errorlevel% equ 0 ( - echo Done Building Torchvision - ) else ( - echo Error: Build Torchvision failed - exit /b 1 - ) - ) else ( - echo Invalid repository name: %repository_name% - exit /b 1 - ) - - dir "%SRC_DIR%" + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + + echo "repository_name=$repository_name" >> "$GITHUB_ENV" + if [ "$repository_name" = "audio" ]; then + cmd //c "$SCRIPTS_DIR/build_audio.bat" + if [ $? -eq 0 ]; then + echo "Done Building Torchaudio" + else + echo "Error: Build Torchaudio failed" + exit 1 + fi + elif [ "$repository_name" = "vision" ]; then + cmd //c "$SCRIPTS_DIR/build_vision.bat" + if [ $? -eq 0 ]; then + echo "Done Building Torchvision" + else + echo "Error: Build Torchvision failed" + exit 1 + fi + else + echo "Invalid repository name: $repository_name" + exit 1 + fi + ls -l "$SRC_DIR" - name: Upload Artifact uses: actions/upload-artifact@v4 with: From 783f83c4a5b74c91652aefc4281a66996b7486d1 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 4 Mar 2025 16:08:23 +0100 Subject: [PATCH 057/120] fix path --- .github/workflows/build_wheels_windows_x64_test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index ad3a30f0d6..223d53d8ae 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -102,13 +102,13 @@ jobs: run: | repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision echo "$repository_name" - echo "SCRIPTS_DIR: $SCRIPTS_DIR" ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" echo "repository_name=$repository_name" >> "$GITHUB_ENV" if [ "$repository_name" = "audio" ]; then - cmd //c "$SCRIPTS_DIR/build_audio.bat" + echo "Attempting to run: $SCRIPTS_DIR/build_audio.bat" + cmd //c "$SCRIPTS_DIR\\build_audio.bat" if [ $? -eq 0 ]; then echo "Done Building Torchaudio" else @@ -116,7 +116,8 @@ jobs: exit 1 fi elif [ "$repository_name" = "vision" ]; then - cmd //c "$SCRIPTS_DIR/build_vision.bat" + echo "Attempting to run: $SCRIPTS_DIR/build_vision.bat" + cmd //c "$SCRIPTS_DIR\\build_vision.bat" if [ $? -eq 0 ]; then echo "Done Building Torchvision" else From e6c5caf963ce043218db8e9d454a8c2e79ad1179 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:00:29 +0100 Subject: [PATCH 058/120] fix links --- .../winx64test/bootstrap_buildtools.bat | 30 ++++++++++--------- .github/scripts/winx64test/bootstrap_git.bat | 4 +-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/scripts/winx64test/bootstrap_buildtools.bat b/.github/scripts/winx64test/bootstrap_buildtools.bat index 7e02be3c99..a7ced81f0d 100644 --- a/.github/scripts/winx64test/bootstrap_buildtools.bat +++ b/.github/scripts/winx64test/bootstrap_buildtools.bat @@ -1,5 +1,4 @@ @echo off -setlocal enabledelayedexpansion echo Dependency MSVC Build Tools with C++ with ARM64/ARM64EC components installation started. @@ -20,36 +19,39 @@ echo Installing Visual Studio Build Tools with C++ components... echo Installing MSVC %MSVC_VERSION% if "%MSVC_VERSION%" == "latest" ( "%INSTALLER_FILE%" --norestart --quiet --wait --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ - --add Microsoft.VisualStudio.Component.Roslyn.Compiler ^ - --add Microsoft.Component.MSBuild ^ - --add Microsoft.VisualStudio.Component.CoreBuildTools ^ - --add Microsoft.VisualStudio.Workload.MSBuildTools ^ + --add Microsoft.VisualStudio.Workload.VCTools ^ --add Microsoft.VisualStudio.Component.Windows10SDK ^ - --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ^ - --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ - --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ - --add Microsoft.VisualStudio.Component.TestTools.BuildTools ^ --add Microsoft.VisualStudio.Component.VC.ASAN ^ - --add Microsoft.VisualStudio.Component.TextTemplating ^ + --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ --add Microsoft.VisualStudio.Component.VC.CoreIde ^ - --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core ^ - --add Microsoft.VisualStudio.Workload.VCTools ^ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ --add Microsoft.VisualStudio.Component.VC.Tools.ARM64EC ^ - --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 ^ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ) else if "%MSVC_VERSION%" == "14.40" ( "%INSTALLER_FILE%" --norestart --nocache --quiet --wait --fix --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ + --add Microsoft.VisualStudio.Workload.VCTools ^ + --add Microsoft.VisualStudio.Component.Windows10SDK ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ --add Microsoft.VisualStudio.Component.VC.ASAN ^ --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ + --add Microsoft.VisualStudio.Component.VC.CoreIde ^ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ --add Microsoft.VisualStudio.Component.VC.14.40.17.10.ARM64 ^ --add Microsoft.VisualStudio.Component.VC.14.40.17.10.x86.x64 ) else if "%MSVC_VERSION%" == "14.36" ( "%INSTALLER_FILE%" --norestart --nocache --quiet --wait --fix --installPath "%DEPENDENCIES_DIR%\VSBuildTools" ^ + --add Microsoft.VisualStudio.Workload.VCTools ^ + --add Microsoft.VisualStudio.Component.Windows10SDK ^ --add Microsoft.VisualStudio.Component.Windows11SDK.22621 ^ --add Microsoft.VisualStudio.Component.VC.ASAN ^ --add Microsoft.VisualStudio.Component.VC.CMake.Project ^ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools ^ + --add Microsoft.VisualStudio.Component.VC.CoreIde ^ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest ^ --add Microsoft.VisualStudio.Component.VC.14.36.17.6.ARM64 ^ --add Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64 ) diff --git a/.github/scripts/winx64test/bootstrap_git.bat b/.github/scripts/winx64test/bootstrap_git.bat index 5a190f9dcb..3a0ad5b1b6 100644 --- a/.github/scripts/winx64test/bootstrap_git.bat +++ b/.github/scripts/winx64test/bootstrap_git.bat @@ -11,8 +11,8 @@ if not exist "%DOWNLOADS_DIR%" mkdir "%DOWNLOADS_DIR%" if not exist "%DEPENDENCIES_DIR%" mkdir "%DEPENDENCIES_DIR%" :: Set download URL for the Git -set "DOWNLOAD_URL=https://github.com/git-for-windows/git/releases/download/v2.46.0.windows.1/Git-2.46.0-64-bit.exe" -set "INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.46.0-64-bit.exe" +set "DOWNLOAD_URL=https://github.com/git-for-windows/git/releases/download/v2.48.1.windows.1/Git-2.48.1-64-bit.exe" +set "INSTALLER_FILE=%DOWNLOADS_DIR%\Git-2.48.1-64-bit.exe" :: Download installer echo Downloading Git... From 3379b83b44e2c7cb23984ddf26642cd614780946 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:03:29 +0100 Subject: [PATCH 059/120] reenable steps and change to bash shell --- .../build_wheels_windows_x64_test.yml | 60 ++++++++----------- 1 file changed, 26 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 223d53d8ae..eed3598e76 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -60,43 +60,35 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} submodules: recursive - # - name: Debug Paths - # shell: bash - # run: | - # echo "SCRIPTS_DIR: $SCRIPTS_DIR" - # ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + - name: Debug Paths + shell: bash + run: | + echo "SCRIPTS_DIR: $SCRIPTS_DIR" + ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - # echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - # ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" + echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" + ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - # echo "SRC_DIR: $SRC_DIR" - # ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" + echo "SRC_DIR: $SRC_DIR" + ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" - # echo "Checking src\\pytorch\\vision directory explicitly:" - # ls -l src\\pytorch\\vision || echo "Explicit path check failed" - # - name: Run Bootstrap Git Script - # shell: cmd - # run: | - # echo Running bootstrap_git.bat... - # "%SCRIPTS_DIR%\bootstrap_git.bat" - # - name: Bootstrap Python - # shell: cmd - # run: | - # echo Running bootstrap_python.bat... - # "%SCRIPTS_DIR%\bootstrap_python.bat" - # - name: Bootstrap Build Tools - # shell: cmd - # run: | - # echo Running bootstrap_buildtools.bat... - # "%SCRIPTS_DIR%\bootstrap_buildtools.bat" - # # TODO This should not be needed, update it when tested - # # - name: Download PyTorch wheel artifact - # # uses: actions/download-artifact@v4 - # # with: - # # github-token: ${{ secrets.GITHUB_TOKEN }} - # # run-id: ${{ inputs.pytorch_build_run_id }} - # # name: ${{ inputs.pytorch_build_artifact_name }} - # # path: ${{ env.DOWNLOADS_DIR }} + echo "Checking src\\pytorch\\vision directory explicitly:" + ls -l src\\pytorch\\vision || echo "Explicit path check failed" + - name: Run Bootstrap Git Script + shell: bash + run: | + echo Running bootstrap_git.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" + - name: Bootstrap Python + shell: bash + run: | + echo Running bootstrap_python.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" + - name: Bootstrap Build Tools + shell: bash + run: | + echo Running bootstrap_buildtools.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" - name: Call Build Script shell: bash run: | From 07757fd691ffc0b26d524f6f5e42358a6a1bdfba Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:06:15 +0100 Subject: [PATCH 060/120] retry build script only --- .../build_wheels_windows_x64_test.yml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index eed3598e76..828e8b543c 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -74,21 +74,21 @@ jobs: echo "Checking src\\pytorch\\vision directory explicitly:" ls -l src\\pytorch\\vision || echo "Explicit path check failed" - - name: Run Bootstrap Git Script - shell: bash - run: | - echo Running bootstrap_git.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" - - name: Bootstrap Python - shell: bash - run: | - echo Running bootstrap_python.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" - - name: Bootstrap Build Tools - shell: bash - run: | - echo Running bootstrap_buildtools.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" + # - name: Run Bootstrap Git Script + # shell: bash + # run: | + # echo Running bootstrap_git.bat... + # cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" + # - name: Bootstrap Python + # shell: bash + # run: | + # echo Running bootstrap_python.bat... + # cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" + # - name: Bootstrap Build Tools + # shell: bash + # run: | + # echo Running bootstrap_buildtools.bat... + # cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" - name: Call Build Script shell: bash run: | From 7ed1e781fbad881edeea8a0ac242fdaebb791f25 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:15:26 +0100 Subject: [PATCH 061/120] correctly set environment --- .github/scripts/winx64test/build_vision.bat | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index 21467be3c5..005de8b56a 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -2,10 +2,9 @@ echo "Starting build_vision.bat" @echo on set SRC_PATH=%GITHUB_WORKSPACE%\%SRC_DIR% set CMAKE_BUILD_TYPE=%BUILD_TYPE% -set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat +@REM set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set CONDA_PREFIX=%DEPENDENCIES_DIR% set PATH=%PATH%;%CONDA_PREFIX%\Library\bin -set DISTUTILS_USE_SDK=1 @REM :: find toch file name by searching @REM for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" @@ -50,7 +49,21 @@ pip install numpy pip3 install torch :: Activate visual studio -call "%VCVARSALL_PATH%" x64 +set VC_VERSION_LOWER=17 +set VC_VERSION_UPPER=18 + +for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -legacy -products * -version [%VC_VERSION_LOWER%^,%VC_VERSION_UPPER%^) -property installationPath`) do ( + if exist "%%i" if exist "%%i\VC\Auxiliary\Build\vcvarsall.bat" ( + set "VS15INSTALLDIR=%%i" + set "VS15VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat" + goto vswhere + ) +) + +:vswhere +call "%VS15VCVARSALL%" x64 || exit /b 1 + +set DISTUTILS_USE_SDK=1 :: Creates wheel under dist folder python setup.py bdist_wheel From 042eb0ea25527ae76134b7fc765f45c6b9ce6450 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:30:40 +0100 Subject: [PATCH 062/120] update build script --- .github/scripts/winx64test/build_vision.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index 005de8b56a..a0b68878ea 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -39,10 +39,11 @@ robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll cd %SRC_PATH% :: Virtual environment -python -m pip install --upgrade pip python -m venv .venv -echo * > .venv\.gitignore call .\.venv\Scripts\activate +echo * > .venv\.gitignore +pip install --upgrade pip setuptools +where python :: Install dependencies pip install numpy From 2154383617ed4bb5b4361c4ec9aa83e8f79035b1 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:35:43 +0100 Subject: [PATCH 063/120] test no venv --- .github/scripts/winx64test/build_vision.bat | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index a0b68878ea..66af79761e 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -38,12 +38,11 @@ robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll :: Source directory cd %SRC_PATH% -:: Virtual environment -python -m venv .venv -call .\.venv\Scripts\activate -echo * > .venv\.gitignore -pip install --upgrade pip setuptools -where python +@REM :: Virtual environment +@REM python -m pip install --upgrade pip +@REM python -m venv .venv +@REM echo * > .venv\.gitignore +@REM call .\.venv\Scripts\activate :: Install dependencies pip install numpy From edacacf950cee03cd37058edaa88ca70e9dd0ecc Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 10:55:02 +0100 Subject: [PATCH 064/120] debug prints --- .github/scripts/winx64test/build_vision.bat | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index 66af79761e..94280fca33 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -5,6 +5,7 @@ set CMAKE_BUILD_TYPE=%BUILD_TYPE% @REM set VCVARSALL_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set CONDA_PREFIX=%DEPENDENCIES_DIR% set PATH=%PATH%;%CONDA_PREFIX%\Library\bin +set DISTUTILS_USE_SDK=1 @REM :: find toch file name by searching @REM for /f "delims=" %%f in ('dir /b "%DOWNLOADS_DIR%" ^| findstr "torch-"') do set "PYTORCH_PATH=%DOWNLOADS_DIR%\%%f" @@ -38,11 +39,13 @@ robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll :: Source directory cd %SRC_PATH% -@REM :: Virtual environment -@REM python -m pip install --upgrade pip -@REM python -m venv .venv -@REM echo * > .venv\.gitignore -@REM call .\.venv\Scripts\activate +where python +:: Virtual environment +python -m pip install --upgrade pip +python -m venv .venv --upgrade-deps +echo * > .venv\.gitignore +call .\.venv\Scripts\activate +where python :: Install dependencies pip install numpy @@ -63,7 +66,8 @@ for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio :vswhere call "%VS15VCVARSALL%" x64 || exit /b 1 -set DISTUTILS_USE_SDK=1 +:: Source directory +cd %SRC_PATH% :: Creates wheel under dist folder python setup.py bdist_wheel From a8800b707768638dbc7e409ee165ba096ecef9ee Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 11:11:34 +0100 Subject: [PATCH 065/120] test remove unnecessary lines --- .github/scripts/winx64test/build_vision.bat | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.bat b/.github/scripts/winx64test/build_vision.bat index 94280fca33..9eedf3b994 100644 --- a/.github/scripts/winx64test/build_vision.bat +++ b/.github/scripts/winx64test/build_vision.bat @@ -39,13 +39,11 @@ robocopy /E %DEPENDENCIES_DIR%\Library\bin %SRC_PATH%\torchvision *.dll :: Source directory cd %SRC_PATH% -where python :: Virtual environment python -m pip install --upgrade pip python -m venv .venv --upgrade-deps echo * > .venv\.gitignore call .\.venv\Scripts\activate -where python :: Install dependencies pip install numpy @@ -66,9 +64,6 @@ for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio :vswhere call "%VS15VCVARSALL%" x64 || exit /b 1 -:: Source directory -cd %SRC_PATH% - :: Creates wheel under dist folder python setup.py bdist_wheel From 4f2965a1b77f2caa2433af00dbe5086cc6ae5e80 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 5 Mar 2025 11:38:28 +0100 Subject: [PATCH 066/120] reorder inputs and delete debug print --- .../build_wheels_windows_x64_test.yml | 33 +++++-------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 828e8b543c..dbaa981b2b 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -3,12 +3,6 @@ name: X64 Wheels Build on: workflow_call: inputs: - repository_name: - required: true - type: string - repository_branch: - required: true - type: string python_version: required: false default: "Python312" @@ -17,13 +11,18 @@ on: required: false default: "latest" type: string - pytorch_build_run_id: - required: false - type: string build_type: required: false default: "Release" type: string + repository_name: + required: true + type: string + default: "pytorch/vision" + repository_branch: + required: true + type: string + default: "main" build_version: required: false type: string @@ -47,7 +46,7 @@ jobs: runs-on: windows-latest name: Build wheel steps: - - name: Checkout test-infra Repository + - name: Checkout test-infra repository uses: actions/checkout@v4 with: repository: alinpahontu2912/test-infra @@ -60,20 +59,6 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} submodules: recursive - - name: Debug Paths - shell: bash - run: | - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" - - echo "Checking test-infra\\.github\\scripts\\winx64test\\ directory explicitly:" - ls -l test-infra\\.github\\scripts\\winx64test\\ || echo "Explicit path check failed" - - echo "SRC_DIR: $SRC_DIR" - ls -l "$SRC_DIR" || echo "SRC_DIR does not exist" - - echo "Checking src\\pytorch\\vision directory explicitly:" - ls -l src\\pytorch\\vision || echo "Explicit path check failed" # - name: Run Bootstrap Git Script # shell: bash # run: | From 2b97c09b8f310222e4a4f88e110409d005bacaf6 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 2 Apr 2025 15:36:51 +0200 Subject: [PATCH 067/120] test --- .../build_wheels_windows_x64_test.yml | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index dbaa981b2b..5778e83900 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -59,21 +59,21 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} submodules: recursive - # - name: Run Bootstrap Git Script - # shell: bash - # run: | - # echo Running bootstrap_git.bat... - # cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" - # - name: Bootstrap Python - # shell: bash - # run: | - # echo Running bootstrap_python.bat... - # cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" - # - name: Bootstrap Build Tools - # shell: bash - # run: | - # echo Running bootstrap_buildtools.bat... - # cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" + - name: Run Bootstrap Git Script + shell: bash + run: | + echo Running bootstrap_git.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" + - name: Bootstrap Python + shell: bash + run: | + echo Running bootstrap_python.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" + - name: Bootstrap Build Tools + shell: bash + run: | + echo Running bootstrap_buildtools.bat... + cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" - name: Call Build Script shell: bash run: | From 73619ce875203a3afb1cedf68892d73baee77d70 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 4 Apr 2025 11:20:02 +0200 Subject: [PATCH 068/120] test --- .../build_wheels_windows_x64_test.yml | 120 +++++++++--------- 1 file changed, 58 insertions(+), 62 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 5778e83900..3d2a529270 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -1,41 +1,25 @@ -name: X64 Wheels Build +name: Build Windows X64 Wheels - test on: workflow_call: inputs: python_version: required: false - default: "Python312" - type: string - msvc_version: - required: false - default: "latest" - type: string - build_type: - required: false - default: "Release" + default: "3.12" type: string repository_name: required: true type: string - default: "pytorch/vision" repository_branch: required: true type: string - default: "main" - build_version: - required: false - type: string env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SCRIPTS_DIR: test-infra\\.github\\scripts\\winarm64 SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} - MSVC_VERSION: ${{ inputs.msvc_version }} - BUILD_TYPE: ${{ inputs.build_type }} - BUILD_VERSION : ${{ inputs.build_version }} permissions: id-token: write @@ -59,57 +43,69 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} submodules: recursive - - name: Run Bootstrap Git Script - shell: bash - run: | - echo Running bootstrap_git.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_git.bat" - - name: Bootstrap Python - shell: bash - run: | - echo Running bootstrap_python.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_python.bat" + - name: Git checkout workflow + uses: actions/checkout@v4 + - name: Setup Git for Windows' minimal SDK + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: aarch64 + path: "${{env.DEPENDENCIES_DIR}}\\git" + - name: Bootstrap python + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + architecture: 'arm64' - name: Bootstrap Build Tools shell: bash run: | - echo Running bootstrap_buildtools.bat... - cmd //c "$SCRIPTS_DIR\\bootstrap_buildtools.bat" + "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - name: Call Build Script + shell: cmd + run: | + set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + + for /f "tokens=2 delims=/" %%A in ("%~1") do set "repository_name=%%A" + + cd %SCRIPTS_DIR% + + if "%repository_name%"=="audio" ( + call "%VS_PATH%" arm64 + "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" + ) else if "%repository_name%"=="vision" ( + call "%VS_PATH%" arm64 + "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" + ) else ( + echo Invalid repository name: %repository_name% + exit /b 1 + ) + - name: Install wheel shell: bash run: | - repository_name=$(basename "${{ inputs.repository_name }}") # Extract audio or vision - echo "$repository_name" - echo "SCRIPTS_DIR: $SCRIPTS_DIR" - ls -l "$SCRIPTS_DIR" || echo "SCRIPTS_DIR does not exist" + cd $SRC_DIR + source .venv/Scripts/activate + whl=$(find dist -name "torc*-*.whl" | head -n 1) + pip install $whl + - name: Run smoke test + shell: cmd + run: | + cd %SRC_DIR% + call .venv/Scripts/activate + + for /f "tokens=2 delims=/" %%A in ("%~1") do set "repository_name=%%A" - echo "repository_name=$repository_name" >> "$GITHUB_ENV" - if [ "$repository_name" = "audio" ]; then - echo "Attempting to run: $SCRIPTS_DIR/build_audio.bat" - cmd //c "$SCRIPTS_DIR\\build_audio.bat" - if [ $? -eq 0 ]; then - echo "Done Building Torchaudio" - else - echo "Error: Build Torchaudio failed" - exit 1 - fi - elif [ "$repository_name" = "vision" ]; then - echo "Attempting to run: $SCRIPTS_DIR/build_vision.bat" - cmd //c "$SCRIPTS_DIR\\build_vision.bat" - if [ $? -eq 0 ]; then - echo "Done Building Torchvision" - else - echo "Error: Build Torchvision failed" - exit 1 - fi - else - echo "Invalid repository name: $repository_name" - exit 1 - fi - ls -l "$SRC_DIR" - - name: Upload Artifact + if "%repository_name%"=="audio" ( + python test/smoke_test/smoke_test.py + ) else if "%repository_name%"=="vision" ( + python test/smoke_test.py + ) else ( + echo Invalid repository name: %repository_name% + exit /b 1 + ) + - name: Archive wheel + if: success() uses: actions/upload-artifact@v4 with: - name: ${{ env.repository_name }}-wheel - path: ${{ env.SRC_DIR }}\dist\* + path: ${{ env.SRC_DIR }}/dist/* compression-level: 0 retention-days: 3 \ No newline at end of file From d9ff73d108b71b01521ab74124554968e5e07b1f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 4 Apr 2025 11:29:08 +0200 Subject: [PATCH 069/120] update workflow for x64 --- .../winx64test/bootstrap_buildtools.sh | 39 +++++++++++ .github/scripts/winx64test/build_audio.sh | 69 +++++++++++++++++++ .github/scripts/winx64test/build_vision.sh | 67 ++++++++++++++++++ .../build_wheels_windows_x64_test.yml | 12 ++-- 4 files changed, 182 insertions(+), 5 deletions(-) create mode 100644 .github/scripts/winx64test/bootstrap_buildtools.sh create mode 100644 .github/scripts/winx64test/build_audio.sh create mode 100644 .github/scripts/winx64test/build_vision.sh diff --git a/.github/scripts/winx64test/bootstrap_buildtools.sh b/.github/scripts/winx64test/bootstrap_buildtools.sh new file mode 100644 index 0000000000..a2a1a7166e --- /dev/null +++ b/.github/scripts/winx64test/bootstrap_buildtools.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +echo "Dependency MSVC Build Tools with C++ with ARM64/ARM64EC components installation started." + +# Pre-check for downloads and dependencies folders +mkdir -p "$DOWNLOADS_DIR" +mkdir -p "$DEPENDENCIES_DIR" + +# Set download URL for the Visual Studio Installer +DOWNLOAD_URL="https://aka.ms/vs/17/release/vs_BuildTools.exe" +INSTALLER_FILE="$DOWNLOADS_DIR/vs_BuildTools.exe" + +# Download installer +echo "Downloading Visual Studio Build Tools with C++ installer..." +curl -L -o "$INSTALLER_FILE" "$DOWNLOAD_URL" + +# Install the Visual Studio Build Tools with C++ components +echo "Installing Visual Studio Build Tools with C++ components..." +echo "Installing MSVC $MSVC_VERSION" +"$INSTALLER_FILE" --norestart --quiet --wait --installPath "$DEPENDENCIES_DIR/VSBuildTools" \ + --add Microsoft.VisualStudio.Workload.VCTools \ + --add Microsoft.VisualStudio.Component.Windows10SDK \ + --add Microsoft.VisualStudio.Component.Windows11SDK.22621 \ + --add Microsoft.VisualStudio.Component.VC.ASAN \ + --add Microsoft.VisualStudio.Component.VC.CMake.Project \ + --add Microsoft.VisualStudio.Component.VC.CoreBuildTools \ + --add Microsoft.VisualStudio.Component.VC.CoreIde \ + --add Microsoft.VisualStudio.Component.VC.Redist.14.Latest \ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64EC \ + --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 \ + --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 + +# Check if installation was successful +if [[ $? -ne 0 ]]; then + echo "Failed to install Visual Studio Build Tools with C++ components." + exit 1 +fi + +echo "Dependency Visual Studio Build Tools with C++ installation finished." \ No newline at end of file diff --git a/.github/scripts/winx64test/build_audio.sh b/.github/scripts/winx64test/build_audio.sh new file mode 100644 index 0000000000..7508dba213 --- /dev/null +++ b/.github/scripts/winx64test/build_audio.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +echo "Building audio dependencies and wheel started." + +# Set environment variables +export SRC_PATH="$GITHUB_WORKSPACE/$SRC_DIR" +export VCVARSALL_PATH="$DEPENDENCIES_DIR/VSBuildTools/VC/Auxiliary/Build/vcvarsall.bat" +export CONDA_PREFIX="$DEPENDENCIES_DIR" +export PATH="$PATH:$CONDA_PREFIX/Library/bin" +export DISTUTILS_USE_SDK=1 +export USE_FFMPEG=1 +export FFMPEG_ROOT="$DEPENDENCIES_DIR/Library" +export TRIPLET_FILE="triplets/x64-windows.cmake" + +echo "CONDA_PREFIX: $CONDA_PREFIX" +echo "SRC_PATH: $SRC_PATH" +echo "VCVARSALL_PATH: $VCVARSALL_PATH" +echo "PATH: $PATH" + +# Dependencies +mkdir -p "$DOWNLOADS_DIR" +mkdir -p "$DEPENDENCIES_DIR" +echo "*" > "$DOWNLOADS_DIR/.gitignore" +echo "*" > "$DEPENDENCIES_DIR/.gitignore" + +# Install vcpkg +cd "$DOWNLOADS_DIR" || exit +git clone https://github.com/microsoft/vcpkg.git -b 2024.07.12 +cd vcpkg || exit +./bootstrap-vcpkg.sh + +# Set vcpkg to only build release packages +echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" + +# Install dependencies using vcpkg +./vcpkg install ffmpeg[ffmpeg]:x64-windows --x-install-root="$DEPENDENCIES_DIR" + +# Copy files using cp (replace robocopy) +mkdir -p "$DEPENDENCIES_DIR/Library/" +cp -r "$DEPENDENCIES_DIR/x64-windows/"* "$DEPENDENCIES_DIR/Library" +cp -r "$DEPENDENCIES_DIR/Library/tools/ffmpeg/"* "$DEPENDENCIES_DIR/Library/bin" +cp -r "$DEPENDENCIES_DIR/Library/bin/"* "$SRC_PATH/src/torio/lib" + +# Test ffmpeg installation +echo "$FFMPEG_ROOT" +ffmpeg -version + +# Source directory +cd "$SRC_PATH" || exit + +# Create virtual environment +python -m pip install --upgrade pip +python -m venv .venv +echo "*" > .venv/.gitignore +source .venv/Scripts/activate + +# Install dependencies +pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + +# Create wheel under dist folder +python setup.py bdist_wheel + +# Check if build was successful +if [[ $? -ne 0 ]]; then + echo "Failed on build_audio. (exitcode = $?)" + exit 1 +fi + +echo "Build finished successfully." diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh new file mode 100644 index 0000000000..c2731f4eb9 --- /dev/null +++ b/.github/scripts/winx64test/build_vision.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +echo "Building vision dependencies and wheel started." + +# Set environment variables +export SRC_PATH="$GITHUB_WORKSPACE/$SRC_DIR" +export CMAKE_BUILD_TYPE="$BUILD_TYPE" +export VCVARSALL_PATH="$DEPENDENCIES_DIR/VSBuildTools/VC/Auxiliary/Build/vcvarsall.bat" +export CONDA_PREFIX="$DEPENDENCIES_DIR" +export PATH="$PATH:$CONDA_PREFIX/Library/bin" +export DISTUTILS_USE_SDK=1 +export TRIPLET_FILE="triplets/x64-windows.cmake" + +# Dependencies +mkdir -p "$DOWNLOADS_DIR" +mkdir -p "$DEPENDENCIES_DIR" +echo "*" > "$DOWNLOADS_DIR/.gitignore" +echo "*" > "$DEPENDENCIES_DIR/.gitignore" + +# Install vcpkg +cd "$DOWNLOADS_DIR" || exit +git clone https://github.com/microsoft/vcpkg.git +cd vcpkg || exit +./bootstrap-vcpkg.sh + +# Set vcpkg to only build release packages +echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" + +# Install dependencies using vcpkg +./vcpkg install libjpeg-turbo:x64-windows --x-install-root="$DEPENDENCIES_DIR" +./vcpkg install libwebp:x64-windows --x-install-root="$DEPENDENCIES_DIR" +./vcpkg install libpng[tools]:x64-windows --x-install-root="$DEPENDENCIES_DIR" +# Building with FFMPEG is disabled by default +# ./vcpkg install ffmpeg[ffmpeg]:x64-windows --x-install-root="$DEPENDENCIES_DIR" + +# Copy files using cp (replace robocopy) +cp "$DEPENDENCIES_DIR/x64-windows/lib/libpng16.lib" "$DEPENDENCIES_DIR/x64-windows/lib/libpng.lib" +cp "$DEPENDENCIES_DIR/x64-windows/bin/libpng16.dll" "$DEPENDENCIES_DIR/x64-windows/bin/libpng.dll" +cp "$DEPENDENCIES_DIR/x64-windows/bin/libpng16.pdb" "$DEPENDENCIES_DIR/x64-windows/bin/libpng.pdb" +mkdir -p "$DEPENDENCIES_DIR/Library/" +cp -r "$DEPENDENCIES_DIR/x64-windows/"* "$DEPENDENCIES_DIR/Library/" +cp -r "$DEPENDENCIES_DIR/Library/tools/libpng/"* "$DEPENDENCIES_DIR/Library/bin/" +cp -r "$DEPENDENCIES_DIR/Library/bin/"* "$SRC_PATH/torchvision" + +# Source directory +cd "$SRC_PATH" || exit + +# Create virtual environment +python -m pip install --upgrade pip +python -m venv .venv +echo "*" > .venv/.gitignore +source .venv/Scripts/activate + +# Install dependencies +pip install numpy==2.2.3 +pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu + +# Create wheel under dist folder +python setup.py bdist_wheel + +# Check if build was successful +if [[ $? -ne 0 ]]; then + echo "Failed on build_vision. (exit code = $?)" + exit 1 +fi + +echo "Build finished successfully." diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 3d2a529270..c44a69dc44 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -17,7 +17,7 @@ on: env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winarm64 + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} @@ -30,6 +30,8 @@ jobs: runs-on: windows-latest name: Build wheel steps: + - name: Print inputs + run: echo "${{ toJSON(github.event.inputs) }}" - name: Checkout test-infra repository uses: actions/checkout@v4 with: @@ -48,13 +50,13 @@ jobs: - name: Setup Git for Windows' minimal SDK uses: git-for-windows/setup-git-for-windows-sdk@v1 with: - architecture: aarch64 + architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Bootstrap python uses: actions/setup-python@v5 with: python-version: ${{ inputs.python_version }} - architecture: 'arm64' + architecture: x64 - name: Bootstrap Build Tools shell: bash run: | @@ -70,10 +72,10 @@ jobs: cd %SCRIPTS_DIR% if "%repository_name%"=="audio" ( - call "%VS_PATH%" arm64 + call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" ) else if "%repository_name%"=="vision" ( - call "%VS_PATH%" arm64 + call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" ) else ( echo Invalid repository name: %repository_name% From 7dbdd7cc814ea316cb3c5966d9d0715d33fb3cb5 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 4 Apr 2025 11:45:29 +0200 Subject: [PATCH 070/120] change steps order --- .../workflows/build_wheels_windows_x64_test.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index c44a69dc44..713e9862b7 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -31,7 +31,12 @@ jobs: name: Build wheel steps: - name: Print inputs - run: echo "${{ toJSON(github.event.inputs) }}" + run: echo "${{ toJSON(github.action.inputs) }}" + - name: Setup Git for Windows' minimal SDK + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: x86_64 + path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Checkout test-infra repository uses: actions/checkout@v4 with: @@ -45,13 +50,6 @@ jobs: ref: ${{ inputs.repository_branch }} path: src/${{ inputs.repository_name }} submodules: recursive - - name: Git checkout workflow - uses: actions/checkout@v4 - - name: Setup Git for Windows' minimal SDK - uses: git-for-windows/setup-git-for-windows-sdk@v1 - with: - architecture: x86_64 - path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Bootstrap python uses: actions/setup-python@v5 with: From 6808a427f899ffb50fc67cf74f5193da28449df2 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 4 Apr 2025 12:03:12 +0200 Subject: [PATCH 071/120] update repo name extraction --- .../workflows/build_wheels_windows_x64_test.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 713e9862b7..37f9993853 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -20,6 +20,7 @@ env: SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} PYTHON_VERSION: ${{ inputs.python_version }} + EXTRACTED_REPO_NAME: ${{ endsWith(inputs.repository_name, 'audio') && 'audio' || endsWith(inputs.repository_name, 'vision') && 'vision' || '' }} permissions: id-token: write @@ -65,18 +66,16 @@ jobs: set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - for /f "tokens=2 delims=/" %%A in ("%~1") do set "repository_name=%%A" - cd %SCRIPTS_DIR% - if "%repository_name%"=="audio" ( + if "${{ env.EXTRACTED_REPO_NAME }}"=="audio" ( call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - ) else if "%repository_name%"=="vision" ( + ) else if "${{ env.EXTRACTED_REPO_NAME }}"=="vision" ( call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" ) else ( - echo Invalid repository name: %repository_name% + echo Invalid repository name: ${{ inputs.repository_name }} exit /b 1 ) - name: Install wheel @@ -92,14 +91,12 @@ jobs: cd %SRC_DIR% call .venv/Scripts/activate - for /f "tokens=2 delims=/" %%A in ("%~1") do set "repository_name=%%A" - - if "%repository_name%"=="audio" ( + if "${{ env.EXTRACTED_REPO_NAME }}"=="audio" ( python test/smoke_test/smoke_test.py - ) else if "%repository_name%"=="vision" ( + ) else if "${{ env.EXTRACTED_REPO_NAME }}"=="vision" ( python test/smoke_test.py ) else ( - echo Invalid repository name: %repository_name% + echo Invalid repository name: ${{ inputs.repository_name }} exit /b 1 ) - name: Archive wheel From a91803983cac95761f1b2fc19ca1dca2c1b11291 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 4 Apr 2025 12:21:14 +0200 Subject: [PATCH 072/120] fix torch install --- .github/scripts/winx64test/build_vision.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh index c2731f4eb9..a4fbe44d6e 100644 --- a/.github/scripts/winx64test/build_vision.sh +++ b/.github/scripts/winx64test/build_vision.sh @@ -9,7 +9,7 @@ export VCVARSALL_PATH="$DEPENDENCIES_DIR/VSBuildTools/VC/Auxiliary/Build/vcvarsa export CONDA_PREFIX="$DEPENDENCIES_DIR" export PATH="$PATH:$CONDA_PREFIX/Library/bin" export DISTUTILS_USE_SDK=1 -export TRIPLET_FILE="triplets/x64-windows.cmake" +# export TRIPLET_FILE="triplets/x64-windows.cmake" # Dependencies mkdir -p "$DOWNLOADS_DIR" @@ -23,8 +23,8 @@ git clone https://github.com/microsoft/vcpkg.git cd vcpkg || exit ./bootstrap-vcpkg.sh -# Set vcpkg to only build release packages -echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" +# # Set vcpkg to only build release packages +# echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" # Install dependencies using vcpkg ./vcpkg install libjpeg-turbo:x64-windows --x-install-root="$DEPENDENCIES_DIR" @@ -53,7 +53,7 @@ source .venv/Scripts/activate # Install dependencies pip install numpy==2.2.3 -pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu +pip3 install torch # Create wheel under dist folder python setup.py bdist_wheel From 3a1f1f717854331f3d524ca7f1196793c2d51237 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 7 Apr 2025 16:02:13 +0200 Subject: [PATCH 073/120] attempt merge workflows --- .github/workflows/build_wheels_windows.yml | 84 +++++++++++++++++++ .../build_wheels_windows_x64_test.yml | 15 ++-- 2 files changed, 92 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index ba18cf7dfd..9094d6308a 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -68,6 +68,10 @@ on: description: 'Timeout for the job (in minutes)' default: 60 type: number + aarch: + description: 'Architecture to build for' + default: "" + type: string permissions: id-token: write @@ -75,6 +79,7 @@ permissions: jobs: build: + if: ${{ inputs.aarch == '' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -232,6 +237,85 @@ jobs: build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} + build_x64_test: + if: ${{ inputs.aarch == 'arm64' }} + strategy: + fail-fast: false + matrix: ${{ fromJSON(inputs.build-matrix) }} + env: + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SRC_DIR: src\\${{ inputs.repository }} + PYTHON_VERSION: ${{ matrix.python_version }} + PACKAGE_NAME: ${{ inputs.package-name }} + runs-on: "windows-latest" + steps: + - name: Setup Git for Windows' minimal SDK + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: x86_64 + path: "${{env.DEPENDENCIES_DIR}}\\git" + - name: Checkout test-infra repository + uses: actions/checkout@v4 + with: + repository: ${{inputs.test-infra-repository}} + ref: ${{inputs.test-infra-ref}} + path: test-infra + - name: Checkout Target Repository (${{ inputs.repository }}) + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + path: src/${{ inputs.repository }} + submodules: recursive + - name: Bootstrap python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + architecture: x64 + - name: Bootstrap Build Tools + shell: bash + run: | + "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" + - name: Call Build Script + shell: cmd + run: | + set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + cd %SCRIPTS_DIR% + + if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" + ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" + ) else ( + echo Invalid repository name: ${{ inputs.repository }} + exit /b 1 + ) + - name: Install wheel + shell: bash + run: | + cd $SRC_DIR + source .venv/Scripts/activate + whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + pip install $whl + - name: Run smoke test + shell: cmd + run: | + cd %SRC_DIR% + call .venv/Scripts/activate + python ${{ inputs.smoke-test-script}} + - name: Archive wheel + if: success() + uses: actions/upload-artifact@v4 + with: + path: ${{ env.SRC_DIR }}/dist/* + compression-level: 0 + retention-days: 3 + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true diff --git a/.github/workflows/build_wheels_windows_x64_test.yml b/.github/workflows/build_wheels_windows_x64_test.yml index 37f9993853..db83ad081f 100644 --- a/.github/workflows/build_wheels_windows_x64_test.yml +++ b/.github/workflows/build_wheels_windows_x64_test.yml @@ -3,23 +3,24 @@ name: Build Windows X64 Wheels - test on: workflow_call: inputs: - python_version: - required: false - default: "3.12" - type: string - repository_name: + # python_version: + # required: false + # default: "3.12" + # type: string + repository_name: # change NAME required: true type: string - repository_branch: + repository_branch: # rename with ref + default value change required: true type: string +# add choice input env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository_name }} - PYTHON_VERSION: ${{ inputs.python_version }} + PYTHON_VERSION: 3.12 ## update here ${{ inputs.python_version }} EXTRACTED_REPO_NAME: ${{ endsWith(inputs.repository_name, 'audio') && 'audio' || endsWith(inputs.repository_name, 'vision') && 'vision' || '' }} permissions: From d24f0652654e4a1dd3021f8b8885eb1810bb8d40 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Mon, 7 Apr 2025 16:17:51 +0200 Subject: [PATCH 074/120] change test-infra references --- .github/workflows/build_wheels_windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 9094d6308a..1b6e91ee6b 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -238,7 +238,7 @@ jobs: trigger-event: ${{ inputs.trigger-event }} build_x64_test: - if: ${{ inputs.aarch == 'arm64' }} + if: ${{ inputs.aarch == 'x64' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -259,8 +259,8 @@ jobs: - name: Checkout test-infra repository uses: actions/checkout@v4 with: - repository: ${{inputs.test-infra-repository}} - ref: ${{inputs.test-infra-ref}} + repository: alinpahontu2912/test-infra + ref: x64windows_test path: test-infra - name: Checkout Target Repository (${{ inputs.repository }}) uses: actions/checkout@v4 From ac6581a8db9f5c874b9db33d6a3e64e41ffa49ab Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 10:21:49 +0200 Subject: [PATCH 075/120] test concurrency group --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 1b6e91ee6b..1ff3419310 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -317,5 +317,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.aarch }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true From 1eb878e8a0caecf625086789c63111a9a9eef6ec Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 10:38:24 +0200 Subject: [PATCH 076/120] test aarch --- .github/workflows/build_wheels_windows.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 1ff3419310..b730f5effe 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -79,7 +79,6 @@ permissions: jobs: build: - if: ${{ inputs.aarch == '' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -238,7 +237,6 @@ jobs: trigger-event: ${{ inputs.trigger-event }} build_x64_test: - if: ${{ inputs.aarch == 'x64' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -251,6 +249,14 @@ jobs: PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: + - name: Echo matrix input + shell: cmd + run: | + echo "Python version: ${{ matrix.python_version }}" + echo "Package name: ${{ inputs.package-name }}" + echo "Repository: ${{ inputs.repository }}" + echo "Ref: ${{ matrix.ref }}" + echo "aarch: ${{ matrix.aarch }}" - name: Setup Git for Windows' minimal SDK uses: git-for-windows/setup-git-for-windows-sdk@v1 with: From 362eca60ddc68b248bc1cbeb561ee4a1035f6f15 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 13:25:04 +0200 Subject: [PATCH 077/120] test correct input --- .github/workflows/build_wheels_windows.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index b730f5effe..5f0ca181ee 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -239,24 +239,23 @@ jobs: build_x64_test: strategy: fail-fast: false - matrix: ${{ fromJSON(inputs.build-matrix) }} env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository }} - PYTHON_VERSION: ${{ matrix.python_version }} + PYTHON_VERSION: '3.12' PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: - name: Echo matrix input shell: cmd run: | - echo "Python version: ${{ matrix.python_version }}" + echo "Python version: ${{ inputs.python_version }}" echo "Package name: ${{ inputs.package-name }}" echo "Repository: ${{ inputs.repository }}" - echo "Ref: ${{ matrix.ref }}" - echo "aarch: ${{ matrix.aarch }}" + echo "Ref: ${{ inputs.ref }}" + echo "aarch: ${{ inputs.aarch }}" - name: Setup Git for Windows' minimal SDK uses: git-for-windows/setup-git-for-windows-sdk@v1 with: From 7b3ffb3fef239d4c836e62aee8372cdbaec5db0d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 14:47:54 +0200 Subject: [PATCH 078/120] delete input debug echos --- .github/scripts/winx64test/build_vision.sh | 6 ++---- .github/workflows/build_wheels_windows.yml | 10 +--------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh index a4fbe44d6e..8da71b4351 100644 --- a/.github/scripts/winx64test/build_vision.sh +++ b/.github/scripts/winx64test/build_vision.sh @@ -9,7 +9,7 @@ export VCVARSALL_PATH="$DEPENDENCIES_DIR/VSBuildTools/VC/Auxiliary/Build/vcvarsa export CONDA_PREFIX="$DEPENDENCIES_DIR" export PATH="$PATH:$CONDA_PREFIX/Library/bin" export DISTUTILS_USE_SDK=1 -# export TRIPLET_FILE="triplets/x64-windows.cmake" +export TRIPLET_FILE="triplets/x64-windows.cmake" # Dependencies mkdir -p "$DOWNLOADS_DIR" @@ -24,14 +24,12 @@ cd vcpkg || exit ./bootstrap-vcpkg.sh # # Set vcpkg to only build release packages -# echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" +echo "set(VCPKG_BUILD_TYPE release)" >> "$TRIPLET_FILE" # Install dependencies using vcpkg ./vcpkg install libjpeg-turbo:x64-windows --x-install-root="$DEPENDENCIES_DIR" ./vcpkg install libwebp:x64-windows --x-install-root="$DEPENDENCIES_DIR" ./vcpkg install libpng[tools]:x64-windows --x-install-root="$DEPENDENCIES_DIR" -# Building with FFMPEG is disabled by default -# ./vcpkg install ffmpeg[ffmpeg]:x64-windows --x-install-root="$DEPENDENCIES_DIR" # Copy files using cp (replace robocopy) cp "$DEPENDENCIES_DIR/x64-windows/lib/libpng16.lib" "$DEPENDENCIES_DIR/x64-windows/lib/libpng.lib" diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 5f0ca181ee..cae2c3bc32 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -248,14 +248,6 @@ jobs: PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: - - name: Echo matrix input - shell: cmd - run: | - echo "Python version: ${{ inputs.python_version }}" - echo "Package name: ${{ inputs.package-name }}" - echo "Repository: ${{ inputs.repository }}" - echo "Ref: ${{ inputs.ref }}" - echo "aarch: ${{ inputs.aarch }}" - name: Setup Git for Windows' minimal SDK uses: git-for-windows/setup-git-for-windows-sdk@v1 with: @@ -322,5 +314,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.aarch }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true From 372f7a9d022bb915a29d70575af6a2298da0ac55 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 15:43:59 +0200 Subject: [PATCH 079/120] test --- .github/workflows/build_wheels_windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index cae2c3bc32..917f627c70 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -239,12 +239,13 @@ jobs: build_x64_test: strategy: fail-fast: false + matrix: ${{ fromJSON(inputs.build-matrix) }} env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository }} - PYTHON_VERSION: '3.12' + PYTHON_VERSION: ${{ matrix.python-version }} PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: From 32f7721df0ba5f41d9bda9239e28f948aaf8587a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 15:47:58 +0200 Subject: [PATCH 080/120] change concurrency group --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 917f627c70..cc02d5c862 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -315,5 +315,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.aarch }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true From 5b01ea4daa3805ef59ae81e7daa61f0598f0d187 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Tue, 8 Apr 2025 17:34:34 +0200 Subject: [PATCH 081/120] add check for arch --- .github/workflows/build_wheels_windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index cc02d5c862..19d3a425e1 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -79,6 +79,7 @@ permissions: jobs: build: + if : ${{ inputs.aarch == '' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -237,6 +238,7 @@ jobs: trigger-event: ${{ inputs.trigger-event }} build_x64_test: + if : ${{ inputs.aarch == 'x64' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} From 9cdbf5e9635fc3f527940146016a3e93ec4c9f84 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 10:40:23 +0200 Subject: [PATCH 082/120] add debug prints --- .github/workflows/build_wheels_windows.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 51e0502ddc..3133b963d3 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -79,7 +79,7 @@ permissions: jobs: build: - if : ${{ inputs.aarch == '' }} + if : ${{ inputs.aarch != 'x64' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -251,6 +251,13 @@ jobs: PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: + - name: echo inputs + run: | + echo "repository: ${{ inputs.repository }}" + echo "ref: ${{ inputs.ref }}" + echo "test-infra-repository: ${{ inputs.test-infra-repository }}" + echo "test-infra-ref: ${{ inputs.test-infra-ref }}" + echo "build-matrix: ${{ inputs.build-matrix }}" - name: Setup Git for Windows' minimal SDK uses: git-for-windows/setup-git-for-windows-sdk@v1 with: From 326757c02648a6c63583e4ac034c84b6f22028d0 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 11:09:49 +0200 Subject: [PATCH 083/120] correct if upload condition --- .github/workflows/build_wheels_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 3133b963d3..cd9a022eef 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -228,7 +228,7 @@ jobs: upload: needs: build uses: ./.github/workflows/_binary_upload.yml - if: always() + if: needs.build.result == 'success' && inputs.aarch != 'x64' with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -324,5 +324,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.aarch }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true From b01f7cf6013e28436a094055c2b9c7f45cdcd914 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 11:24:42 +0200 Subject: [PATCH 084/120] add python version input --- .github/workflows/build_wheels_windows.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index cd9a022eef..5c0c589ffa 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -72,6 +72,10 @@ on: description: 'Architecture to build for' default: "" type: string + python-version: + description: 'Python version to use' + default: "" + type: string permissions: id-token: write @@ -247,7 +251,7 @@ jobs: DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository }} - PYTHON_VERSION: ${{ matrix.python-version }} + PYTHON_VERSION: ${{ inputs.python-version }} PACKAGE_NAME: ${{ inputs.package-name }} runs-on: "windows-latest" steps: From f7586505ff5074e649200d44a01d6f0f2f84b8a5 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 11:30:15 +0200 Subject: [PATCH 085/120] update upload condition --- .github/workflows/build_wheels_windows.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 5c0c589ffa..f7e2ff7b2a 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -232,7 +232,7 @@ jobs: upload: needs: build uses: ./.github/workflows/_binary_upload.yml - if: needs.build.result == 'success' && inputs.aarch != 'x64' + if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.aarch != 'x64'}} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -243,9 +243,6 @@ jobs: build_x64_test: if : ${{ inputs.aarch == 'x64' }} - strategy: - fail-fast: false - matrix: ${{ fromJSON(inputs.build-matrix) }} env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ From 82ec4ab9a1d89e1f4ee576abb8d51c441019f882 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 11:46:21 +0200 Subject: [PATCH 086/120] test scratch --- .github/workflows/build_wheels_windows.yml | 148 ++++++++++----------- 1 file changed, 69 insertions(+), 79 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index f7e2ff7b2a..f73eca0fca 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -68,14 +68,10 @@ on: description: 'Timeout for the job (in minutes)' default: 60 type: number - aarch: - description: 'Architecture to build for' - default: "" - type: string - python-version: - description: 'Python version to use' - default: "" - type: string + iswinarm64: + description: 'Is the build for winarm64?' + default: false + type: boolean permissions: id-token: write @@ -83,7 +79,7 @@ permissions: jobs: build: - if : ${{ inputs.aarch != 'x64' }} + if: ${{ inputs.iswinarm64 != true }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -232,7 +228,7 @@ jobs: upload: needs: build uses: ./.github/workflows/_binary_upload.yml - if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.aarch != 'x64'}} + if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.iswinarm64 != true }} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -248,82 +244,76 @@ jobs: DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: src\\${{ inputs.repository }} - PYTHON_VERSION: ${{ inputs.python-version }} + PYTHON_VERSION: 3.12 PACKAGE_NAME: ${{ inputs.package-name }} + name: Build and Test ${{ inputs.repository }} runs-on: "windows-latest" steps: - - name: echo inputs - run: | - echo "repository: ${{ inputs.repository }}" - echo "ref: ${{ inputs.ref }}" - echo "test-infra-repository: ${{ inputs.test-infra-repository }}" - echo "test-infra-ref: ${{ inputs.test-infra-ref }}" - echo "build-matrix: ${{ inputs.build-matrix }}" - - name: Setup Git for Windows' minimal SDK - uses: git-for-windows/setup-git-for-windows-sdk@v1 - with: - architecture: x86_64 - path: "${{env.DEPENDENCIES_DIR}}\\git" - - name: Checkout test-infra repository - uses: actions/checkout@v4 - with: - repository: alinpahontu2912/test-infra - ref: x64windows_test - path: test-infra - - name: Checkout Target Repository (${{ inputs.repository }}) - uses: actions/checkout@v4 - with: + - name: Setup Git for Windows' minimal SDK + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: x86_64 + path: "${{env.DEPENDENCIES_DIR}}\\git" + - name: Checkout test-infra repository + uses: actions/checkout@v4 + with: + repository: alinpahontu2912/test-infra + ref: x64windows_test + path: test-infra + - name: Checkout Target Repository (${{ inputs.repository }}) + uses: actions/checkout@v4 + with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} path: src/${{ inputs.repository }} submodules: recursive - - name: Bootstrap python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - architecture: x64 - - name: Bootstrap Build Tools - shell: bash - run: | - "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - - name: Call Build Script - shell: cmd - run: | - set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat - set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - cd %SCRIPTS_DIR% - - if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" - ) else ( - echo Invalid repository name: ${{ inputs.repository }} - exit /b 1 - ) - - name: Install wheel - shell: bash - run: | - cd $SRC_DIR - source .venv/Scripts/activate - whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) - pip install $whl - - name: Run smoke test - shell: cmd - run: | - cd %SRC_DIR% - call .venv/Scripts/activate - python ${{ inputs.smoke-test-script}} - - name: Archive wheel - if: success() - uses: actions/upload-artifact@v4 - with: - path: ${{ env.SRC_DIR }}/dist/* - compression-level: 0 - retention-days: 3 + - name: Bootstrap python + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + architecture: x64 + - name: Bootstrap Build Tools + shell: bash + run: | + "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" + - name: Call Build Script + shell: cmd + run: | + set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + cd %SCRIPTS_DIR% + + if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" + ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" + ) else ( + echo Invalid repository name: ${{ inputs.repository }} + exit /b 1 + ) + - name: Install wheel + shell: bash + run: | + cd $SRC_DIR + source .venv/Scripts/activate + whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + pip install $whl + - name: Run smoke test + shell: cmd + run: | + cd %SRC_DIR% + call .venv/Scripts/activate + python ${{ inputs.smoke-test-script}} + - name: Archive wheel + if: success() + uses: actions/upload-artifact@v4 + with: + path: ${{ env.SRC_DIR }}/dist/* + compression-level: 0 + retention-days: 3 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} - cancel-in-progress: true + cancel-in-progress: true \ No newline at end of file From 9a115522b87a7066b3f0dc70130705e71263ea4f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 11:50:16 +0200 Subject: [PATCH 087/120] change input name --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index f73eca0fca..c65d24c556 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -238,7 +238,7 @@ jobs: trigger-event: ${{ inputs.trigger-event }} build_x64_test: - if : ${{ inputs.aarch == 'x64' }} + if : ${{ inputs.iswinarm64 == true }} env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ From ee8575e0270af05816d1d9665c8a8a0a6cc94c3a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 12:03:59 +0200 Subject: [PATCH 088/120] change concurrency gorup --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index c65d24c556..c61d582526 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -315,5 +315,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.iswinarm64 }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true \ No newline at end of file From b5aba83c067aa94db589b5450f380b40b3533118 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 13:26:08 +0200 Subject: [PATCH 089/120] change concurrency group --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index c61d582526..c65d24c556 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -315,5 +315,5 @@ jobs: retention-days: 3 concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ inputs.iswinarm64 }}-${{ github.event_name == 'workflow_dispatch' }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} cancel-in-progress: true \ No newline at end of file From f6310ed3bdf1a80173d61ea5cc439edc29b8587b Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 15:50:06 +0200 Subject: [PATCH 090/120] update generate_binary_wheels matrix for winarm64 --- .github/workflows/build_wheels_windows.yml | 14 +++++------ tools/scripts/generate_binary_build_matrix.py | 23 ++++++++++++++----- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index c65d24c556..04754bbd54 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -68,10 +68,10 @@ on: description: 'Timeout for the job (in minutes)' default: 60 type: number - iswinarm64: - description: 'Is the build for winarm64?' - default: false - type: boolean + architecture: + description: 'CPU architecture to build for' + default: "x64" + type: string permissions: id-token: write @@ -79,7 +79,7 @@ permissions: jobs: build: - if: ${{ inputs.iswinarm64 != true }} + if: ${{ inputs.architecture == 'x64' }} strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -228,7 +228,7 @@ jobs: upload: needs: build uses: ./.github/workflows/_binary_upload.yml - if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.iswinarm64 != true }} + if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.architecture == 'x64' }} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -238,7 +238,7 @@ jobs: trigger-event: ${{ inputs.trigger-event }} build_x64_test: - if : ${{ inputs.iswinarm64 == true }} + if : ${{ inputs.architecture == 'arm64' }} env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index adc0b4e10a..912b5e065f 100755 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -25,6 +25,7 @@ "nightly": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "test": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "release": ["3.9", "3.10", "3.11", "3.12", "3.13"], + "win_arm64": ["3.12"] } CUDA_ARCHES_DICT = { "nightly": ["11.8", "12.6", "12.8"], @@ -64,6 +65,7 @@ LINUX_AARCH64 = "linux-aarch64" MACOS_ARM64 = "macos-arm64" WINDOWS = "windows" +WINDOWS_ARM64 = "windows-arm64" # Accelerator architectures CPU = "cpu" @@ -94,9 +96,11 @@ LINUX_AARCH64_GPU_RUNNER = "linux.arm64.m7g.4xlarge" WIN_GPU_RUNNER = "windows.g4dn.xlarge" WIN_CPU_RUNNER = "windows.4xlarge" +WIN_ARM64_RUNNER = "windows-latest" MACOS_M1_RUNNER = "macos-m1-stable" PACKAGES_TO_INSTALL_WHL = "torch torchvision torchaudio" +PACKAGES_TO_INSTALL_WHL_WIN_ARM64 = "torch" WHL_INSTALL_BASE = "pip3 install" DOWNLOAD_URL_BASE = "https://download.pytorch.org" @@ -133,8 +137,10 @@ def validation_runner(arch_type: str, os: str) -> str: elif os == WINDOWS: if arch_type == CUDA: return WIN_GPU_RUNNER - else: + elif arch_type == CPU: return WIN_CPU_RUNNER + elif os == WINDOWS_ARM64: + return WIN_ARM64_RUNNER elif os == MACOS_ARM64: return MACOS_M1_RUNNER else: # default to linux cpu runner @@ -296,11 +302,13 @@ def get_wheel_install_command( ): return f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}" else: - whl_install_command = ( - f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL}" - if channel == "nightly" - else f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}" - ) + whl_install_command = "" + if os == WINDOWS_ARM64: + whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL_WIN_ARM64}" + elif channel == "nightly": + whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL}" + else: + whl_install_command = f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}" return f"{whl_install_command} --index-url {get_base_download_url_for_repo('whl', channel, gpu_arch_type, desired_cuda)}" # noqa: E501 @@ -432,6 +440,9 @@ def generate_wheels_matrix( if not python_versions: # Define default python version python_versions = list(PYTHON_ARCHES) + + if os == WINDOWS_ARM64: + python_versions = list(PYTHON_ARCHES_DICT["win_arm64"]) if os == LINUX: # NOTE: We only build manywheel packages for linux From 8682f55421a28773ff81dc1825e0991fe375e27d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 9 Apr 2025 16:08:46 +0200 Subject: [PATCH 091/120] if statement change --- .github/workflows/build_wheels_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 04754bbd54..d4c390de4f 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -79,7 +79,7 @@ permissions: jobs: build: - if: ${{ inputs.architecture == 'x64' }} + if: inputs.architecture == 'x64' strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -226,9 +226,9 @@ jobs: name: Teardown Windows upload: + if: needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.architecture == 'x64' needs: build uses: ./.github/workflows/_binary_upload.yml - if: ${{ needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.architecture == 'x64' }} with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} From 0ce05275d10b2ef069ad4c954f86dcb3aeaf9af7 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 11:26:40 +0200 Subject: [PATCH 092/120] first attemot combine arm64 and x64 actions --- .github/workflows/build_wheels_windows.yml | 239 +++++++++++++-------- 1 file changed, 153 insertions(+), 86 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index d4c390de4f..f9b7308447 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -79,7 +79,6 @@ permissions: jobs: build: - if: inputs.architecture == 'x64' strategy: fail-fast: false matrix: ${{ fromJSON(inputs.build-matrix) }} @@ -90,9 +89,10 @@ jobs: REF: ${{ inputs.ref }} CU_VERSION: ${{ matrix.desired_cuda }} UPLOAD_TO_BASE_BUCKET: ${{ matrix.upload_to_base_bucket }} - name: build-${{ matrix.build_name }} + name: build-${{ matrix.build_name }}-${{ matrix.gpu_arch_type }}- runs-on: ${{ matrix.validation_runner }} defaults: + run: shell: bash -l {0} # If a build is taking longer than 60 minutes on these runners we need @@ -107,21 +107,24 @@ jobs: path: test-infra - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH + if: inputs.architecture == 'x64' with: github-secret: ${{ secrets.GITHUB_TOKEN }} activate-with-label: false instructions: "SSH with rdesktop using ssh -L 3389:localhost:3389 %%username%%@%%hostname%%" - name: Add Conda scripts to GitHub path + if: inputs.architecture == 'x64' run: | echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel - - name: Set PYTORCH_VERSION - if: ${{ env.CHANNEL == 'test' }} + - name: Set PYTORCH_VERSION + if: env.CHANNEL == 'test' && inputs.architecture == 'x64' run: | # When building RC, set the version to be the current candidate version, # otherwise, leave it alone so nightly will pick up the latest echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds + if: inputs.architecture == 'x64' with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -136,13 +139,31 @@ jobs: XPU_VERSION: '2025.0' run: | cmd //c .\\test-infra\\.github\\scripts\\install_xpu.bat + - name: Setup Git for Windows' minimal SDK + if: inputs.architecture == 'arm64' + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: x86_64 + path: "${{env.DEPENDENCIES_DIR}}\\git" + - name: Bootstrap python + if: inputs.architecture == 'arm64' + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + architecture: x64 + - name: Bootstrap Build Tools + if: inputs.architecture == 'arm64' + shell: bash + run: | + "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - name: Install torch dependency + if: inputs.architecture == 'x64' run: | source "${BUILD_ENV_FILE}" # shellcheck disable=SC2086 ${CONDA_RUN} ${PIP_INSTALL_TORCH} - name: Run Pre-Script with Caching - if: ${{ inputs.pre-script != '' }} + if: ${{ inputs.pre-script != '' && inputs.architecture == 'x64' }} uses: ./test-infra/.github/actions/run-script-with-cache with: cache-path: ${{ inputs.cache-path }} @@ -151,6 +172,7 @@ jobs: script: ${{ inputs.pre-script }} is_windows: 'enabled' - name: Build clean + if: inputs.architecture == 'x64' working-directory: ${{ inputs.repository }} env: ENV_SCRIPT: ${{ inputs.env-script }} @@ -166,7 +188,8 @@ jobs: ${CONDA_RUN} ${ENV_SCRIPT} python setup.py clean fi fi - - name: Build the wheel (bdist_wheel) + - name: Build the wheel (bdist_wheel) X64 + if: inputs.architecture == 'x64' working-directory: ${{ inputs.repository }} env: ENV_SCRIPT: ${{ inputs.env-script }} @@ -187,17 +210,38 @@ jobs: else ${CONDA_RUN} ${ENV_SCRIPT} python setup.py bdist_wheel ${BUILD_PARAMS} fi + - name: Build the wheel (bdist_wheel) Arm64 + if: inputs.architecture == 'arm64' + shell: cmd + env: + PACKAGE_NAME: ${{ inputs.package-name }} + run: | + set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + cd %SCRIPTS_DIR% + + if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" + ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" + ) else ( + echo Invalid repository name: ${{ inputs.repository }} + exit /b 1 + ) - name: Run post-script working-directory: ${{ inputs.repository }} env: POST_SCRIPT: ${{ inputs.post-script }} ENV_SCRIPT: ${{ inputs.env-script }} - if: ${{ inputs.post-script != '' }} + if: ${{ inputs.post-script != '' && inputs.architecture == 'x64'}} run: | set -euxo pipefail source "${BUILD_ENV_FILE}" ${CONDA_RUN} ${ENV_SCRIPT} ${POST_SCRIPT} - - name: Smoke Test + - name: Smoke Test X64 + if: inputs.architecture == 'x64' env: ENV_SCRIPT: ${{ inputs.env-script }} PACKAGE_NAME: ${{ inputs.package-name }} @@ -215,18 +259,34 @@ jobs: ${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" fi # NB: Only upload to GitHub after passing smoke tests + - name: Install wheel ARM64 + if: inputs.architecture == 'arm64' + shell: bash + run: | + cd $SRC_DIR + source .venv/Scripts/activate + whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + pip install $whl + - name: Smoke Test arm64 + if: inputs.architecture == 'arm64' + shell: cmd + run: | + cd %SRC_DIR% + call .venv/Scripts/activate + python ${{ inputs.smoke-test-script}} - name: Upload wheel to GitHub continue-on-error: true + if: success() uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + # name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ - uses: ./test-infra/.github/actions/teardown-windows - if: always() + if: inputs.architecture == 'x64' name: Teardown Windows upload: - if: needs.build.result != 'skipped' && needs.build.result == 'success' && inputs.architecture == 'x64' + if: always() needs: build uses: ./.github/workflows/_binary_upload.yml with: @@ -237,82 +297,89 @@ jobs: build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} - build_x64_test: - if : ${{ inputs.architecture == 'arm64' }} - env: - DOWNLOADS_DIR: c:\temp\downloads\ - DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: src\\${{ inputs.repository }} - PYTHON_VERSION: 3.12 - PACKAGE_NAME: ${{ inputs.package-name }} - name: Build and Test ${{ inputs.repository }} - runs-on: "windows-latest" - steps: - - name: Setup Git for Windows' minimal SDK - uses: git-for-windows/setup-git-for-windows-sdk@v1 - with: - architecture: x86_64 - path: "${{env.DEPENDENCIES_DIR}}\\git" - - name: Checkout test-infra repository - uses: actions/checkout@v4 - with: - repository: alinpahontu2912/test-infra - ref: x64windows_test - path: test-infra - - name: Checkout Target Repository (${{ inputs.repository }}) - uses: actions/checkout@v4 - with: - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref }} - path: src/${{ inputs.repository }} - submodules: recursive - - name: Bootstrap python - uses: actions/setup-python@v5 - with: - python-version: ${{ env.PYTHON_VERSION }} - architecture: x64 - - name: Bootstrap Build Tools - shell: bash - run: | - "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - - name: Call Build Script - shell: cmd - run: | - set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat - set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - cd %SCRIPTS_DIR% + # build_x64_test: + # if: inputs.architecture == 'arm64' + # strategy: + # fail-fast: false + # matrix: ${{ fromJSON(inputs.build-matrix) }} + # env: + # DOWNLOADS_DIR: c:\temp\downloads\ + # DEPENDENCIES_DIR: c:\temp\dependencies\ + # SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + # SRC_DIR: src\\${{ inputs.repository }} + # PYTHON_VERSION: ${{ matrix.python_version }} + # PACKAGE_NAME: ${{ inputs.package-name }} + # name: ${{ inputs.repository }} + # runs-on: "windows-latest" + # steps: + # - name: Setup Git for Windows' minimal SDK + # uses: git-for-windows/setup-git-for-windows-sdk@v1 + # with: + # architecture: x86_64 + # path: "${{env.DEPENDENCIES_DIR}}\\git" + # - name: Checkout test-infra repository + # uses: actions/checkout@v4 + # with: + # repository: alinpahontu2912/test-infra + # ref: x64windows_test + # path: test-infra + # - name: Checkout Target Repository (${{ inputs.repository }}) + # if: inputs.architecture == 'x64' + # uses: actions/checkout@v4 + # with: + # repository: ${{ inputs.repository }} + # ref: ${{ inputs.ref }} + # path: src/${{ inputs.repository }} + # submodules: recursive + # - name: Bootstrap python + # if: inputs.architecture == 'x64' + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ env.PYTHON_VERSION }} + # architecture: x64 + # - name: Bootstrap Build Tools + # if: inputs.architecture == 'x64' + # shell: bash + # run: | + # "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" + # - name: Call Build Script + # if: inputs.architecture == 'x64' + # shell: cmd + # run: | + # set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + # set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + # cd %SCRIPTS_DIR% - if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" - ) else ( - echo Invalid repository name: ${{ inputs.repository }} - exit /b 1 - ) - - name: Install wheel - shell: bash - run: | - cd $SRC_DIR - source .venv/Scripts/activate - whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) - pip install $whl - - name: Run smoke test - shell: cmd - run: | - cd %SRC_DIR% - call .venv/Scripts/activate - python ${{ inputs.smoke-test-script}} - - name: Archive wheel - if: success() - uses: actions/upload-artifact@v4 - with: - path: ${{ env.SRC_DIR }}/dist/* - compression-level: 0 - retention-days: 3 + # if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( + # call "%VS_PATH%" x64 + # "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" + # ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( + # call "%VS_PATH%" x64 + # "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" + # ) else ( + # echo Invalid repository name: ${{ inputs.repository }} + # exit /b 1 + # ) + # - name: Install wheel + # shell: bash + # run: | + # cd $SRC_DIR + # source .venv/Scripts/activate + # whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + # pip install $whl + # - name: Run smoke test + # shell: cmd + # run: | + # cd %SRC_DIR% + # call .venv/Scripts/activate + # python ${{ inputs.smoke-test-script}} + # - name: Archive wheel + # if: success() + # uses: actions/upload-artifact@v4 + # with: + # path: ${{ env.SRC_DIR }}/dist/* + # compression-level: 0 + # retention-days: 3 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} From dbccee5cc41a3ec51c11a3a69e66770dc01e624a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 11:37:11 +0200 Subject: [PATCH 093/120] add repo checkout and env variables --- .github/workflows/build_wheels_windows.yml | 99 ++++------------------ 1 file changed, 15 insertions(+), 84 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index f9b7308447..2d5b71e5a4 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -77,6 +77,12 @@ permissions: id-token: write contents: read +env: + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SRC_DIR: src\\${{ inputs.repository }} + jobs: build: strategy: @@ -117,6 +123,7 @@ jobs: run: | echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel + if: inputs.architecture == 'x64' - name: Set PYTORCH_VERSION if: env.CHANNEL == 'test' && inputs.architecture == 'x64' run: | @@ -145,6 +152,13 @@ jobs: with: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" + - name: Checkout Target Repository (${{ inputs.repository_name }}) + uses: actions/checkout@v4 + with: + repository: ${{ inputs.repository_name }} + ref: ${{ inputs.repository_branch }} + path: src/${{ inputs.repository_name }} + submodules: recursive - name: Bootstrap python if: inputs.architecture == 'arm64' uses: actions/setup-python@v5 @@ -286,9 +300,9 @@ jobs: name: Teardown Windows upload: - if: always() needs: build uses: ./.github/workflows/_binary_upload.yml + if: always() && needs.build.outputs == 'true' with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} @@ -297,89 +311,6 @@ jobs: build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} - # build_x64_test: - # if: inputs.architecture == 'arm64' - # strategy: - # fail-fast: false - # matrix: ${{ fromJSON(inputs.build-matrix) }} - # env: - # DOWNLOADS_DIR: c:\temp\downloads\ - # DEPENDENCIES_DIR: c:\temp\dependencies\ - # SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - # SRC_DIR: src\\${{ inputs.repository }} - # PYTHON_VERSION: ${{ matrix.python_version }} - # PACKAGE_NAME: ${{ inputs.package-name }} - # name: ${{ inputs.repository }} - # runs-on: "windows-latest" - # steps: - # - name: Setup Git for Windows' minimal SDK - # uses: git-for-windows/setup-git-for-windows-sdk@v1 - # with: - # architecture: x86_64 - # path: "${{env.DEPENDENCIES_DIR}}\\git" - # - name: Checkout test-infra repository - # uses: actions/checkout@v4 - # with: - # repository: alinpahontu2912/test-infra - # ref: x64windows_test - # path: test-infra - # - name: Checkout Target Repository (${{ inputs.repository }}) - # if: inputs.architecture == 'x64' - # uses: actions/checkout@v4 - # with: - # repository: ${{ inputs.repository }} - # ref: ${{ inputs.ref }} - # path: src/${{ inputs.repository }} - # submodules: recursive - # - name: Bootstrap python - # if: inputs.architecture == 'x64' - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ env.PYTHON_VERSION }} - # architecture: x64 - # - name: Bootstrap Build Tools - # if: inputs.architecture == 'x64' - # shell: bash - # run: | - # "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - # - name: Call Build Script - # if: inputs.architecture == 'x64' - # shell: cmd - # run: | - # set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat - # set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - # cd %SCRIPTS_DIR% - - # if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( - # call "%VS_PATH%" x64 - # "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - # ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( - # call "%VS_PATH%" x64 - # "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" - # ) else ( - # echo Invalid repository name: ${{ inputs.repository }} - # exit /b 1 - # ) - # - name: Install wheel - # shell: bash - # run: | - # cd $SRC_DIR - # source .venv/Scripts/activate - # whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) - # pip install $whl - # - name: Run smoke test - # shell: cmd - # run: | - # cd %SRC_DIR% - # call .venv/Scripts/activate - # python ${{ inputs.smoke-test-script}} - # - name: Archive wheel - # if: success() - # uses: actions/upload-artifact@v4 - # with: - # path: ${{ env.SRC_DIR }}/dist/* - # compression-level: 0 - # retention-days: 3 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} From 1735123a3eacbf1722f5a0579d054234a00fb7e6 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 11:48:46 +0200 Subject: [PATCH 094/120] fix target repo checkout --- .github/workflows/build_wheels_windows.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 2d5b71e5a4..bb60097850 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -152,18 +152,18 @@ jobs: with: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - - name: Checkout Target Repository (${{ inputs.repository_name }}) + - name: Checkout Target Repository (${{ inputs.repository }}) uses: actions/checkout@v4 with: - repository: ${{ inputs.repository_name }} - ref: ${{ inputs.repository_branch }} - path: src/${{ inputs.repository_name }} + repository: ${{ inputs.repository }} + ref: ${{ inputs.ref }} + path: src/${{ inputs.repository }} submodules: recursive - name: Bootstrap python if: inputs.architecture == 'arm64' uses: actions/setup-python@v5 with: - python-version: ${{ inputs.python_version }} + python-version: ${{ matrix.python_version }} architecture: x64 - name: Bootstrap Build Tools if: inputs.architecture == 'arm64' From f5c6e6caf1a80b3da7c8d473256b98150ab8cd34 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 14:21:07 +0200 Subject: [PATCH 095/120] add debug prints --- .github/workflows/build_wheels_windows.yml | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index bb60097850..3d001acea8 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -111,6 +111,15 @@ jobs: repository: ${{ inputs.test-infra-repository }} ref: ${{ inputs.test-infra-ref }} path: test-infra + - name: Debug echo + shell: bash + run: | + echo "Shell: Git Bash" + echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" + echo "Current directory:" + pwd + echo "Contents of GITHUB_WORKSPACE:" + ls -la "$GITHUB_WORKSPACE" - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH if: inputs.architecture == 'x64' @@ -152,12 +161,12 @@ jobs: with: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - - name: Checkout Target Repository (${{ inputs.repository }}) + - name: Checkout Target Repository (${{ env.REPOSITORY }}) uses: actions/checkout@v4 with: - repository: ${{ inputs.repository }} - ref: ${{ inputs.ref }} - path: src/${{ inputs.repository }} + repository: ${{ env.REPOSITORY }} + ref: ${{ env.REf }} + path: src/${{ env.REPOSITORY }} submodules: recursive - name: Bootstrap python if: inputs.architecture == 'arm64' @@ -275,6 +284,8 @@ jobs: # NB: Only upload to GitHub after passing smoke tests - name: Install wheel ARM64 if: inputs.architecture == 'arm64' + env: + PACKAGE_NAME: ${{ inputs.package-name }} shell: bash run: | cd $SRC_DIR @@ -283,6 +294,8 @@ jobs: pip install $whl - name: Smoke Test arm64 if: inputs.architecture == 'arm64' + env: + SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} shell: cmd run: | cd %SRC_DIR% @@ -302,7 +315,7 @@ jobs: upload: needs: build uses: ./.github/workflows/_binary_upload.yml - if: always() && needs.build.outputs == 'true' + if: always() with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} From 04a8d695f0702c6c70eaf55e8acc8e1026e29a82 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 14:54:16 +0200 Subject: [PATCH 096/120] add test workflow + small refactor --- .github/workflows/build_wheels_windows.yml | 31 ++++++------- .../test_build_wheels_windows_arm64.yml | 46 +++++++++++++++++++ 2 files changed, 61 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test_build_wheels_windows_arm64.yml diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 3d001acea8..56f21d1285 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -112,7 +112,6 @@ jobs: ref: ${{ inputs.test-infra-ref }} path: test-infra - name: Debug echo - shell: bash run: | echo "Shell: Git Bash" echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" @@ -120,6 +119,14 @@ jobs: pwd echo "Contents of GITHUB_WORKSPACE:" ls -la "$GITHUB_WORKSPACE" + cd .. + echo "one directory up:" + pwd + ls -la + cd .. + echo "another directory up:" + pwd + ls -la - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH if: inputs.architecture == 'x64' @@ -162,12 +169,13 @@ jobs: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Checkout Target Repository (${{ env.REPOSITORY }}) + if: inputs.architecture == 'arm64' uses: actions/checkout@v4 with: repository: ${{ env.REPOSITORY }} ref: ${{ env.REf }} path: src/${{ env.REPOSITORY }} - submodules: recursive + submodules: recursive - name: Bootstrap python if: inputs.architecture == 'arm64' uses: actions/setup-python@v5 @@ -176,7 +184,6 @@ jobs: architecture: x64 - name: Bootstrap Build Tools if: inputs.architecture == 'arm64' - shell: bash run: | "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - name: Install torch dependency @@ -235,9 +242,9 @@ jobs: fi - name: Build the wheel (bdist_wheel) Arm64 if: inputs.architecture == 'arm64' - shell: cmd env: PACKAGE_NAME: ${{ inputs.package-name }} + shell: cmd run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe @@ -281,26 +288,18 @@ jobs: echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} found" ${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" fi - # NB: Only upload to GitHub after passing smoke tests - - name: Install wheel ARM64 + - name: Smoke Test ARM64 if: inputs.architecture == 'arm64' env: PACKAGE_NAME: ${{ inputs.package-name }} - shell: bash + SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} run: | cd $SRC_DIR source .venv/Scripts/activate whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) pip install $whl - - name: Smoke Test arm64 - if: inputs.architecture == 'arm64' - env: - SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} - shell: cmd - run: | - cd %SRC_DIR% - call .venv/Scripts/activate - python ${{ inputs.smoke-test-script}} + python "$SMOKE_TEST_SCRIPT" + # NB: Only upload to GitHub after passing smoke tests - name: Upload wheel to GitHub continue-on-error: true if: success() diff --git a/.github/workflows/test_build_wheels_windows_arm64.yml b/.github/workflows/test_build_wheels_windows_arm64.yml new file mode 100644 index 0000000000..f971604be7 --- /dev/null +++ b/.github/workflows/test_build_wheels_windows_arm64.yml @@ -0,0 +1,46 @@ +name: Test Build Windows Wheels without CUDA + +on: + pull_request: + paths: + - .github/actions/setup-binary-builds/action.yml + - .github/workflows/test_build_wheels_windows_arm64.yml + - .github/workflows/build_wheels_windows_x64.yml + - .github/workflows/generate_binary_build_matrix.yml + - tools/scripts/generate_binary_build_matrix.py + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + generate-matrix: + uses: ./.github/workflows/generate_binary_build_matrix.yml + with: + package-type: wheel + os: windows + test-infra-repository: ${{ github.repository }} + test-infra-ref: ${{ github.ref }} + with-cuda: disable + architecture: arm64 + test: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/audio + smoke-test-script: test//smoke_test.py + package-name: torchvision + uses: ./.github/workflows/build_wheels_windows.yml + name: ${{ matrix.repository }} + with: + repository: ${{ matrix.repository }} + ref: nightly + test-infra-repository: ${{ github.repository }} + test-infra-ref: ${{ github.ref }} + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + smoke-test-script: ${{ matrix.smoke-test-script }} + package-name: ${{ matrix.package-name }} + trigger-event: "${{ github.event_name }}" From b6a66706d84aa07e2787fb848a31942f1f87c752 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 15:23:24 +0200 Subject: [PATCH 097/120] add checks to smoke_test arm64 --- .github/workflows/build_wheels_windows.yml | 47 +++++++++------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 56f21d1285..5be090206f 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -111,22 +111,6 @@ jobs: repository: ${{ inputs.test-infra-repository }} ref: ${{ inputs.test-infra-ref }} path: test-infra - - name: Debug echo - run: | - echo "Shell: Git Bash" - echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE" - echo "Current directory:" - pwd - echo "Contents of GITHUB_WORKSPACE:" - ls -la "$GITHUB_WORKSPACE" - cd .. - echo "one directory up:" - pwd - ls -la - cd .. - echo "another directory up:" - pwd - ls -la - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH if: inputs.architecture == 'x64' @@ -140,8 +124,14 @@ jobs: echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel if: inputs.architecture == 'x64' + - name: Setup Git for Windows' minimal SDK + if: inputs.architecture == 'arm64' + uses: git-for-windows/setup-git-for-windows-sdk@v1 + with: + architecture: x86_64 + path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Set PYTORCH_VERSION - if: env.CHANNEL == 'test' && inputs.architecture == 'x64' + if: env.CHANNEL == 'test' run: | # When building RC, set the version to be the current candidate version, # otherwise, leave it alone so nightly will pick up the latest @@ -162,18 +152,12 @@ jobs: XPU_VERSION: '2025.0' run: | cmd //c .\\test-infra\\.github\\scripts\\install_xpu.bat - - name: Setup Git for Windows' minimal SDK - if: inputs.architecture == 'arm64' - uses: git-for-windows/setup-git-for-windows-sdk@v1 - with: - architecture: x86_64 - path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Checkout Target Repository (${{ env.REPOSITORY }}) if: inputs.architecture == 'arm64' uses: actions/checkout@v4 with: repository: ${{ env.REPOSITORY }} - ref: ${{ env.REf }} + ref: ${{ env.REF }} path: src/${{ env.REPOSITORY }} submodules: recursive - name: Bootstrap python @@ -250,10 +234,10 @@ jobs: set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe cd %SCRIPTS_DIR% - if "${{ env.PACKAGE_NAME }}"=="torchaudio" ( + if "${{ env.PACKAGE_NAME }}" == "torchaudio" ( call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - ) else if "${{ env.PACKAGE_NAME }}"=="torchvision" ( + ) else if "${{ env.PACKAGE_NAME }}" == "torchvision" ( call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" ) else ( @@ -298,11 +282,18 @@ jobs: source .venv/Scripts/activate whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) pip install $whl - python "$SMOKE_TEST_SCRIPT" + + if [[ ! -f ${SMOKE_TEST_SCRIPT} ]]; then + echo "${SMOKE_TEST_SCRIPT} not found" + python -c "import ${PACKAGE_NAME}; print('package version is ', ${PACKAGE_NAME}.__version__)" + else + echo "${SMOKE_TEST_SCRIPT} found" + python "$SMOKE_TEST_SCRIPT" + fi # NB: Only upload to GitHub after passing smoke tests - name: Upload wheel to GitHub continue-on-error: true - if: success() + uses: actions/upload-artifact@v4 with: # name: ${{ env.ARTIFACT_NAME }} From 329b16441fb14e324c3fa3bc925a6f5cbe2b6d6f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 15:34:44 +0200 Subject: [PATCH 098/120] test pytorch version ref --- .github/scripts/winx64test/build_vision.sh | 5 ++++- .github/workflows/build_wheels_windows.yml | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh index 8da71b4351..6bd485021b 100644 --- a/.github/scripts/winx64test/build_vision.sh +++ b/.github/scripts/winx64test/build_vision.sh @@ -10,6 +10,9 @@ export CONDA_PREFIX="$DEPENDENCIES_DIR" export PATH="$PATH:$CONDA_PREFIX/Library/bin" export DISTUTILS_USE_SDK=1 export TRIPLET_FILE="triplets/x64-windows.cmake" +export PYTORCH_VERSION="$PYTORCH_VERSION" + +echo "Pytorch version: $PYTORCH_VERSION" # Dependencies mkdir -p "$DOWNLOADS_DIR" @@ -51,7 +54,7 @@ source .venv/Scripts/activate # Install dependencies pip install numpy==2.2.3 -pip3 install torch +pip3 install torch=="$PYTORCH_VERSION" # Create wheel under dist folder python setup.py bdist_wheel diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 5be090206f..a9a7bc8ffe 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -131,11 +131,11 @@ jobs: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Set PYTORCH_VERSION - if: env.CHANNEL == 'test' + if: env.CHANNEL == 'test' || inputs.architecture == 'arm64' run: | # When building RC, set the version to be the current candidate version, # otherwise, leave it alone so nightly will pick up the latest - echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" + echo "PYTORCH_VERSION=2.7" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds if: inputs.architecture == 'x64' with: @@ -293,7 +293,6 @@ jobs: # NB: Only upload to GitHub after passing smoke tests - name: Upload wheel to GitHub continue-on-error: true - uses: actions/upload-artifact@v4 with: # name: ${{ env.ARTIFACT_NAME }} From 7817e78b855048841c0361cd001a362991cf1884 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 15:35:29 +0200 Subject: [PATCH 099/120] test extra python version --- tools/scripts/generate_binary_build_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index 912b5e065f..b2f1c0bc6a 100755 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -25,7 +25,7 @@ "nightly": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "test": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "release": ["3.9", "3.10", "3.11", "3.12", "3.13"], - "win_arm64": ["3.12"] + "win_arm64": ["3.11", "3.12"] } CUDA_ARCHES_DICT = { "nightly": ["11.8", "12.6", "12.8"], From a2e91a84b5a8d1fc6d06843d6057928e1b135e27 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 16:16:59 +0200 Subject: [PATCH 100/120] revert hardcoded version string --- .github/scripts/winx64test/build_vision.sh | 9 ++++++--- .github/workflows/build_wheels_windows.yml | 4 ++-- tools/scripts/generate_binary_build_matrix.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh index 6bd485021b..e14d093fa9 100644 --- a/.github/scripts/winx64test/build_vision.sh +++ b/.github/scripts/winx64test/build_vision.sh @@ -12,8 +12,6 @@ export DISTUTILS_USE_SDK=1 export TRIPLET_FILE="triplets/x64-windows.cmake" export PYTORCH_VERSION="$PYTORCH_VERSION" -echo "Pytorch version: $PYTORCH_VERSION" - # Dependencies mkdir -p "$DOWNLOADS_DIR" mkdir -p "$DEPENDENCIES_DIR" @@ -54,7 +52,12 @@ source .venv/Scripts/activate # Install dependencies pip install numpy==2.2.3 -pip3 install torch=="$PYTORCH_VERSION" +if [ -z "$PYTORCH_VERSION" ]; then + echo "PYTORCH_VERSION is not set, installing the latest version of PyTorch." + pip3 install torch +else + pip3 install torch=="$PYTORCH_VERSION" +fi # Create wheel under dist folder python setup.py bdist_wheel diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index a9a7bc8ffe..82b895005a 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -131,11 +131,11 @@ jobs: architecture: x86_64 path: "${{env.DEPENDENCIES_DIR}}\\git" - name: Set PYTORCH_VERSION - if: env.CHANNEL == 'test' || inputs.architecture == 'arm64' + if: env.CHANNEL == 'test' run: | # When building RC, set the version to be the current candidate version, # otherwise, leave it alone so nightly will pick up the latest - echo "PYTORCH_VERSION=2.7" >> "${GITHUB_ENV}" + echo "PYTORCH_VERSION=${{ matrix.stable_version }}" >> "${GITHUB_ENV}" - uses: ./test-infra/.github/actions/setup-binary-builds if: inputs.architecture == 'x64' with: diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index b2f1c0bc6a..912b5e065f 100755 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -25,7 +25,7 @@ "nightly": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "test": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "release": ["3.9", "3.10", "3.11", "3.12", "3.13"], - "win_arm64": ["3.11", "3.12"] + "win_arm64": ["3.12"] } CUDA_ARCHES_DICT = { "nightly": ["11.8", "12.6", "12.8"], From 7fbd6dcb65327f1f5adc1d5e87546dbee1cc58a0 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Thu, 10 Apr 2025 16:40:45 +0200 Subject: [PATCH 101/120] update channel/pytorch version configs --- .github/scripts/winx64test/build_vision.sh | 14 +++++++++++--- .github/workflows/build_wheels_windows.yml | 1 - 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/scripts/winx64test/build_vision.sh b/.github/scripts/winx64test/build_vision.sh index e14d093fa9..9eec973dc6 100644 --- a/.github/scripts/winx64test/build_vision.sh +++ b/.github/scripts/winx64test/build_vision.sh @@ -11,6 +11,9 @@ export PATH="$PATH:$CONDA_PREFIX/Library/bin" export DISTUTILS_USE_SDK=1 export TRIPLET_FILE="triplets/x64-windows.cmake" export PYTORCH_VERSION="$PYTORCH_VERSION" +export CHANNEL="$CHANNEL" + +echo "channel: $CHANNEL" # Dependencies mkdir -p "$DOWNLOADS_DIR" @@ -52,11 +55,16 @@ source .venv/Scripts/activate # Install dependencies pip install numpy==2.2.3 -if [ -z "$PYTORCH_VERSION" ]; then - echo "PYTORCH_VERSION is not set, installing the latest version of PyTorch." + +if [ "$CHANNEL" = "release" ]; then + echo "Installing latest stable version of PyTorch." pip3 install torch -else +elif [ "$CHANNEL" = "test" ]; then + echo "Installing PyTorch version $PYTORCH_VERSION." pip3 install torch=="$PYTORCH_VERSION" +else + echo "CHANNEL is not set, installing PyTorch from nightly." + pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu fi # Create wheel under dist folder diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 82b895005a..77454396a3 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -123,7 +123,6 @@ jobs: run: | echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel - if: inputs.architecture == 'x64' - name: Setup Git for Windows' minimal SDK if: inputs.architecture == 'arm64' uses: git-for-windows/setup-git-for-windows-sdk@v1 From 16e68c337f512b59303c436f78dde7709605bb25 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 10:43:52 +0200 Subject: [PATCH 102/120] test similar smoke test wheel finding --- .github/workflows/build_wheels_windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 77454396a3..9e87265dc3 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -279,8 +279,8 @@ jobs: run: | cd $SRC_DIR source .venv/Scripts/activate - whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) - pip install $whl + WHEEL_NAME=$(ls "/dist/") + pip install $WHEEL_NAME if [[ ! -f ${SMOKE_TEST_SCRIPT} ]]; then echo "${SMOKE_TEST_SCRIPT} not found" @@ -311,7 +311,7 @@ jobs: test-infra-ref: ${{ inputs.test-infra-ref }} build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} - + architecture: ${{ inputs.architecture }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} From 413582a09fdb42cc32dd6a66494cb7452dfb904f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 11:02:51 +0200 Subject: [PATCH 103/120] revert wheel finding --- .github/workflows/build_wheels_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 9e87265dc3..909d27c1a4 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -279,8 +279,8 @@ jobs: run: | cd $SRC_DIR source .venv/Scripts/activate - WHEEL_NAME=$(ls "/dist/") - pip install $WHEEL_NAME + whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + pip install $whl if [[ ! -f ${SMOKE_TEST_SCRIPT} ]]; then echo "${SMOKE_TEST_SCRIPT} not found" From cbea4cb9ccd72f8624cf7e3605d5b00e40339d1f Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 12:11:37 +0200 Subject: [PATCH 104/120] final nitpicks --- .github/workflows/build_wheels_windows.yml | 19 ++++++++++--------- .../test_build_wheels_windows_arm64.yml | 2 +- tools/scripts/generate_binary_build_matrix.py | 5 ++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 909d27c1a4..a2e2fee586 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -77,12 +77,6 @@ permissions: id-token: write contents: read -env: - DOWNLOADS_DIR: c:\temp\downloads\ - DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: src\\${{ inputs.repository }} - jobs: build: strategy: @@ -113,7 +107,6 @@ jobs: path: test-infra - uses: ./test-infra/.github/actions/setup-ssh name: Setup SSH - if: inputs.architecture == 'x64' with: github-secret: ${{ secrets.GITHUB_TOKEN }} activate-with-label: false @@ -167,6 +160,9 @@ jobs: architecture: x64 - name: Bootstrap Build Tools if: inputs.architecture == 'arm64' + env: + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ run: | "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - name: Install torch dependency @@ -227,6 +223,10 @@ jobs: if: inputs.architecture == 'arm64' env: PACKAGE_NAME: ${{ inputs.package-name }} + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SRC_DIR: src\\${{ inputs.repository }} shell: cmd run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat @@ -276,10 +276,12 @@ jobs: env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} + SRC_DIR: src\\${{ inputs.repository }} run: | cd $SRC_DIR source .venv/Scripts/activate whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) + echo "ARTIFACT_NAME=$whl" >> $GITHUB_ENV pip install $whl if [[ ! -f ${SMOKE_TEST_SCRIPT} ]]; then @@ -294,7 +296,7 @@ jobs: continue-on-error: true uses: actions/upload-artifact@v4 with: - # name: ${{ env.ARTIFACT_NAME }} + name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ - uses: ./test-infra/.github/actions/teardown-windows if: inputs.architecture == 'x64' @@ -311,7 +313,6 @@ jobs: test-infra-ref: ${{ inputs.test-infra-ref }} build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} - architecture: ${{ inputs.architecture }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/test_build_wheels_windows_arm64.yml b/.github/workflows/test_build_wheels_windows_arm64.yml index f971604be7..0c6db18bcd 100644 --- a/.github/workflows/test_build_wheels_windows_arm64.yml +++ b/.github/workflows/test_build_wheels_windows_arm64.yml @@ -30,7 +30,7 @@ jobs: fail-fast: false matrix: include: - - repository: pytorch/audio + - repository: pytorch/vision smoke-test-script: test//smoke_test.py package-name: torchvision uses: ./.github/workflows/build_wheels_windows.yml diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index 912b5e065f..10e5aeef21 100755 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -25,7 +25,6 @@ "nightly": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "test": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"], "release": ["3.9", "3.10", "3.11", "3.12", "3.13"], - "win_arm64": ["3.12"] } CUDA_ARCHES_DICT = { "nightly": ["11.8", "12.6", "12.8"], @@ -303,7 +302,7 @@ def get_wheel_install_command( return f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}" else: whl_install_command = "" - if os == WINDOWS_ARM64: + if os == WINDOWS_ARM64: # winarm64 only has torch package, only nightly version for now whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL_WIN_ARM64}" elif channel == "nightly": whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL}" @@ -442,7 +441,7 @@ def generate_wheels_matrix( python_versions = list(PYTHON_ARCHES) if os == WINDOWS_ARM64: - python_versions = list(PYTHON_ARCHES_DICT["win_arm64"]) + python_versions = ["3.12"] # only winarm64 verson supported for now if os == LINUX: # NOTE: We only build manywheel packages for linux From 45f88762a4d18a1ece319edad679bd7150e1b698 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 12:18:14 +0200 Subject: [PATCH 105/120] test --- .github/workflows/build_wheels_windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index a2e2fee586..eaa4aee7db 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -163,6 +163,7 @@ jobs: env: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test run: | "${{ env.SCRIPTS_DIR }}\bootstrap_buildtools.sh" - name: Install torch dependency @@ -272,7 +273,7 @@ jobs: ${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" fi - name: Smoke Test ARM64 - if: inputs.architecture == 'arm64' + if: inputs.architecture == 'x64' env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} From 25b53f1ce0978fe0222b1e7ce6bb1a3d72a2a6cc Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 12:27:16 +0200 Subject: [PATCH 106/120] fix path --- .github/workflows/build_wheels_windows.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index eaa4aee7db..8738c97024 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -117,6 +117,8 @@ jobs: echo "C:/Jenkins/Miniconda3/Scripts" >> $GITHUB_PATH - uses: ./test-infra/.github/actions/set-channel - name: Setup Git for Windows' minimal SDK + env: + DEPENDENCIES_DIR: c:\temp\dependencies\ if: inputs.architecture == 'arm64' uses: git-for-windows/setup-git-for-windows-sdk@v1 with: From 1c9901eb1871b0351ac23a5ac1288f0602f06c26 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 13:14:12 +0200 Subject: [PATCH 107/120] add step for creating artifact name --- .github/workflows/build_wheels_windows.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 8738c97024..3d80330efd 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -284,7 +284,6 @@ jobs: cd $SRC_DIR source .venv/Scripts/activate whl=$(find dist -name "${{env.PACKAGE_NAME}}-*.whl" | head -n 1) - echo "ARTIFACT_NAME=$whl" >> $GITHUB_ENV pip install $whl if [[ ! -f ${SMOKE_TEST_SCRIPT} ]]; then @@ -295,11 +294,21 @@ jobs: python "$SMOKE_TEST_SCRIPT" fi # NB: Only upload to GitHub after passing smoke tests + - name: Get Artifact name + if: inputs.architecture == 'arm64' + env: + REPOSITORY: ${{ inputs.repository }} + REF: ${{ inputs.ref }} + PYTHON_VERSION: ${{ matrix.python-version }} + CU_VERSION: ${{ env.CU_VERSION }} + ARCH: ${{ inputs.architecture }} + run: | + echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}" - name: Upload wheel to GitHub continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACT_NAME }} + name: ${{inputs.package-name}} path: ${{ inputs.repository }}/dist/ - uses: ./test-infra/.github/actions/teardown-windows if: inputs.architecture == 'x64' @@ -316,6 +325,7 @@ jobs: test-infra-ref: ${{ inputs.test-infra-ref }} build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} + architecture: ${{ inputs.architecture }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} From 52f32bc565e648257815a2ab008c41b9b1ab206a Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 13:18:13 +0200 Subject: [PATCH 108/120] use right name for artifact --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 3d80330efd..e0be1c6aa6 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -308,7 +308,7 @@ jobs: continue-on-error: true uses: actions/upload-artifact@v4 with: - name: ${{inputs.package-name}} + name: ${{ env.ARTIFACT_NAME }} path: ${{ inputs.repository }}/dist/ - uses: ./test-infra/.github/actions/teardown-windows if: inputs.architecture == 'x64' From 8e425691499bfe0b2ee56b73cb40643154726bfd Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 11 Apr 2025 13:39:18 +0200 Subject: [PATCH 109/120] try fix src_dir --- .github/workflows/build_wheels_windows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index e0be1c6aa6..27eb321d17 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -152,7 +152,7 @@ jobs: with: repository: ${{ env.REPOSITORY }} ref: ${{ env.REF }} - path: src/${{ env.REPOSITORY }} + path: ${{ env.REPOSITORY }} submodules: recursive - name: Bootstrap python if: inputs.architecture == 'arm64' @@ -229,7 +229,7 @@ jobs: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: src\\${{ inputs.repository }} + SRC_DIR: ${{ inputs.repository }} shell: cmd run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat @@ -279,7 +279,7 @@ jobs: env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} - SRC_DIR: src\\${{ inputs.repository }} + SRC_DIR: ${{ inputs.repository }} run: | cd $SRC_DIR source .venv/Scripts/activate @@ -299,7 +299,7 @@ jobs: env: REPOSITORY: ${{ inputs.repository }} REF: ${{ inputs.ref }} - PYTHON_VERSION: ${{ matrix.python-version }} + PYTHON_VERSION: ${{ matrix.python_version }} CU_VERSION: ${{ env.CU_VERSION }} ARCH: ${{ inputs.architecture }} run: | From f3dd438e0ff1850fa67932369c940ad098fb4dc2 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 11:09:47 +0200 Subject: [PATCH 110/120] attempt use pre_script --- .github/workflows/build_wheels_windows.yml | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 27eb321d17..2074321be2 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -229,23 +229,22 @@ jobs: DOWNLOADS_DIR: c:\temp\downloads\ DEPENDENCIES_DIR: c:\temp\dependencies\ SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test - SRC_DIR: ${{ inputs.repository }} + SRC_DIR: ${{ inputs.repository }} + PRE_SCRIPT: ${{ inputs.pre-script }} shell: cmd run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - cd %SCRIPTS_DIR% - - if "${{ env.PACKAGE_NAME }}" == "torchaudio" ( - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_audio.sh" - ) else if "${{ env.PACKAGE_NAME }}" == "torchvision" ( + call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc build_vision.sh" - ) else ( - echo Invalid repository name: ${{ inputs.repository }} - exit /b 1 - ) + "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" + + python setup.py bdist_wheel + + if [[ $? -ne 0 ]]; then + echo "Build failed. (exit code = $?)" + exit 1 + fi - name: Run post-script working-directory: ${{ inputs.repository }} env: From 72736dbbd4ce98f706185593489c7e094ebee6f3 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 11:22:31 +0200 Subject: [PATCH 111/120] update paths --- .github/workflows/build_wheels_windows.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 2074321be2..80c6cd1938 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -235,16 +235,12 @@ jobs: run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + cd SRC_DIR call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" python setup.py bdist_wheel - - if [[ $? -ne 0 ]]; then - echo "Build failed. (exit code = $?)" - exit 1 - fi - name: Run post-script working-directory: ${{ inputs.repository }} env: From 1cc988575dc586dad7591d69ab26fe063c250598 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 11:36:17 +0200 Subject: [PATCH 112/120] attempt fix path --- .github/workflows/build_wheels_windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 80c6cd1938..55d9f17fa9 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -235,8 +235,8 @@ jobs: run: | set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - cd SRC_DIR - + cd %SRC_DIR% + call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" From 5310010dd935779b812c5aea8325170e7612b973 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 11:54:31 +0200 Subject: [PATCH 113/120] add print debugs --- .github/workflows/build_wheels_windows.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 55d9f17fa9..f842d7da00 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -223,7 +223,7 @@ jobs: ${CONDA_RUN} ${ENV_SCRIPT} python setup.py bdist_wheel ${BUILD_PARAMS} fi - name: Build the wheel (bdist_wheel) Arm64 - if: inputs.architecture == 'arm64' + if: ${{ inputs.pre-script != '' && inputs.architecture == 'arm64' }} env: PACKAGE_NAME: ${{ inputs.package-name }} DOWNLOADS_DIR: c:\temp\downloads\ @@ -237,6 +237,9 @@ jobs: set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe cd %SRC_DIR% + echo SRC_DIR=%SRC_DIR% + echo PRE_SCRIPT=%PRE_SCRIPT% + call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" From bac66e65d32289e0a1793d0ee46c2505888feb16 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 13:15:02 +0200 Subject: [PATCH 114/120] call python installation in the right env --- .github/workflows/build_wheels_windows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index f842d7da00..d34a496b9e 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -183,6 +183,7 @@ jobs: repository: ${{ inputs.repository }} script: ${{ inputs.pre-script }} is_windows: 'enabled' + - name: Build clean if: inputs.architecture == 'x64' working-directory: ${{ inputs.repository }} @@ -242,7 +243,7 @@ jobs: call "%VS_PATH%" x64 "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" - + call .\.venv\Scripts\activate python setup.py bdist_wheel - name: Run post-script working-directory: ${{ inputs.repository }} @@ -298,10 +299,9 @@ jobs: REPOSITORY: ${{ inputs.repository }} REF: ${{ inputs.ref }} PYTHON_VERSION: ${{ matrix.python_version }} - CU_VERSION: ${{ env.CU_VERSION }} ARCH: ${{ inputs.architecture }} run: | - echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}" + echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${ARCH}" >> "${GITHUB_ENV}" - name: Upload wheel to GitHub continue-on-error: true uses: actions/upload-artifact@v4 From 98efcd69b62b0c0178fde022c4450b74fdba9f08 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 13:36:56 +0200 Subject: [PATCH 115/120] separate pre-script and build steps --- .github/workflows/build_wheels_windows.yml | 38 ++++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index d34a496b9e..f0517114b8 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -183,7 +183,22 @@ jobs: repository: ${{ inputs.repository }} script: ${{ inputs.pre-script }} is_windows: 'enabled' - + - name: Run Pre-Script arm64 + if: ${{ inputs.pre-script != '' && inputs.architecture == 'arm64' }} + env: + DOWNLOADS_DIR: c:\temp\downloads\ + DEPENDENCIES_DIR: c:\temp\dependencies\ + SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test + SRC_DIR: ${{ inputs.repository }} + PRE_SCRIPT: ${{ inputs.pre-script }} + shell: cmd + run: | + set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat + set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe + cd %SRC_DIR% + + call "%VS_PATH%" x64 + "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" - name: Build clean if: inputs.architecture == 'x64' working-directory: ${{ inputs.repository }} @@ -224,26 +239,13 @@ jobs: ${CONDA_RUN} ${ENV_SCRIPT} python setup.py bdist_wheel ${BUILD_PARAMS} fi - name: Build the wheel (bdist_wheel) Arm64 - if: ${{ inputs.pre-script != '' && inputs.architecture == 'arm64' }} + if: inputs.architecture == 'arm64' env: - PACKAGE_NAME: ${{ inputs.package-name }} - DOWNLOADS_DIR: c:\temp\downloads\ - DEPENDENCIES_DIR: c:\temp\dependencies\ - SCRIPTS_DIR: test-infra\\.github\\scripts\\winx64test SRC_DIR: ${{ inputs.repository }} - PRE_SCRIPT: ${{ inputs.pre-script }} - shell: cmd + shell: bash run: | - set VS_PATH=%DEPENDENCIES_DIR%\VSBuildTools\VC\Auxiliary\Build\vcvarsall.bat - set GIT_BASH=%DEPENDENCIES_DIR%\git\usr\bin\bash.exe - cd %SRC_DIR% - - echo SRC_DIR=%SRC_DIR% - echo PRE_SCRIPT=%PRE_SCRIPT% - - call "%VS_PATH%" x64 - "%GIT_BASH%" -c "bash --noprofile --norc %PRE_SCRIPT%" - call .\.venv\Scripts\activate + cd $SRC_DIR + source .venv/Scripts/activate python setup.py bdist_wheel - name: Run post-script working-directory: ${{ inputs.repository }} From 6633c0d775e58bd87f3e2801ad86614ae0f6946d Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Wed, 30 Apr 2025 13:57:42 +0200 Subject: [PATCH 116/120] enable smoke test --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index f0517114b8..06df7e5511 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -276,7 +276,7 @@ jobs: ${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" fi - name: Smoke Test ARM64 - if: inputs.architecture == 'x64' + if: inputs.architecture == 'arm64' env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} From 55ab2a2119e736c01ec449a2bff8afed47f74c95 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 2 May 2025 11:53:05 +0200 Subject: [PATCH 117/120] fix lint and try to fix failing tests --- .github/workflows/build_wheels_windows.yml | 2 -- tools/scripts/generate_binary_build_matrix.py | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 06df7e5511..ab187927f6 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -242,7 +242,6 @@ jobs: if: inputs.architecture == 'arm64' env: SRC_DIR: ${{ inputs.repository }} - shell: bash run: | cd $SRC_DIR source .venv/Scripts/activate @@ -325,7 +324,6 @@ jobs: test-infra-ref: ${{ inputs.test-infra-ref }} build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} - architecture: ${{ inputs.architecture }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} diff --git a/tools/scripts/generate_binary_build_matrix.py b/tools/scripts/generate_binary_build_matrix.py index 10e5aeef21..a2fdd21515 100755 --- a/tools/scripts/generate_binary_build_matrix.py +++ b/tools/scripts/generate_binary_build_matrix.py @@ -302,7 +302,8 @@ def get_wheel_install_command( return f"{WHL_INSTALL_BASE} {PACKAGES_TO_INSTALL_WHL}" else: whl_install_command = "" - if os == WINDOWS_ARM64: # winarm64 only has torch package, only nightly version for now + if os == WINDOWS_ARM64: + # winarm64 only has only nightly torch package for now whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL_WIN_ARM64}" elif channel == "nightly": whl_install_command = f"{WHL_INSTALL_BASE} --pre {PACKAGES_TO_INSTALL_WHL}" @@ -441,7 +442,7 @@ def generate_wheels_matrix( python_versions = list(PYTHON_ARCHES) if os == WINDOWS_ARM64: - python_versions = ["3.12"] # only winarm64 verson supported for now + python_versions = ["3.12"] # only version supported for now if os == LINUX: # NOTE: We only build manywheel packages for linux From 71de782696e099187be44418eb4b125807f26c8c Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 2 May 2025 12:15:00 +0200 Subject: [PATCH 118/120] disable smoke test --- .github/workflows/build_wheels_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index ab187927f6..3104bfdb3d 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -275,7 +275,7 @@ jobs: ${CONDA_RUN} "${{ inputs.repository }}/${ENV_SCRIPT}" python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" fi - name: Smoke Test ARM64 - if: inputs.architecture == 'arm64' + if: inputs.architecture == 'test' env: PACKAGE_NAME: ${{ inputs.package-name }} SMOKE_TEST_SCRIPT: ${{ inputs.smoke-test-script }} From e3de81f8aa820ec466cb33a73dfab6ed3d2cc562 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 2 May 2025 12:58:27 +0200 Subject: [PATCH 119/120] attempt fix artifact name --- .github/workflows/build_wheels_windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 3104bfdb3d..47b178c8c0 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -139,7 +139,7 @@ jobs: setup-miniconda: false python-version: ${{ env.PYTHON_VERSION }} cuda-version: ${{ env.CU_VERSION }} - arch: ${{ env.ARCH }} + arch: ${{ inputs.architecture }} - name: Install XPU support package if: ${{ matrix.gpu_arch_type == 'xpu' }} env: @@ -324,6 +324,7 @@ jobs: test-infra-ref: ${{ inputs.test-infra-ref }} build-matrix: ${{ inputs.build-matrix }} trigger-event: ${{ inputs.trigger-event }} + architecture: ${{ inputs.architecture }} concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ inputs.repository }}-${{ github.event_name == 'workflow_dispatch' }} From e9c870650974626534f5f3a3e9e7140075b29636 Mon Sep 17 00:00:00 2001 From: alinpahontu2912 Date: Fri, 2 May 2025 14:01:57 +0200 Subject: [PATCH 120/120] add echo step for architecture --- .github/workflows/build_wheels_windows.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_windows.yml b/.github/workflows/build_wheels_windows.yml index 47b178c8c0..a8b955ccdb 100644 --- a/.github/workflows/build_wheels_windows.yml +++ b/.github/workflows/build_wheels_windows.yml @@ -99,6 +99,11 @@ jobs: # to have a conversation timeout-minutes: ${{ inputs.timeout }} steps: + - name: Echo variables + run: | + echo "ENV ARCHITECTURE=${{ env.ARCH }}" + echo "ARCHITECTURE=${{ inputs.architecture }}" + echo "CUDA VERSION=${{ ENV.CU_VERSION }}" - uses: actions/checkout@v4 with: # Support the use case where we need to checkout someone's fork @@ -300,9 +305,10 @@ jobs: REPOSITORY: ${{ inputs.repository }} REF: ${{ inputs.ref }} PYTHON_VERSION: ${{ matrix.python_version }} + CU_VERSION: ${{ env.CU_VERSION }} ARCH: ${{ inputs.architecture }} run: | - echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${ARCH}" >> "${GITHUB_ENV}" + echo "ARTIFACT_NAME=${REPOSITORY//\//_}_${REF//\//_}_${PYTHON_VERSION}_${CU_VERSION}_${ARCH}" >> "${GITHUB_ENV}" - name: Upload wheel to GitHub continue-on-error: true uses: actions/upload-artifact@v4