From bceee414a4d00c6c40ae47540b11a8b5eb124d43 Mon Sep 17 00:00:00 2001 From: Zhitao Yu Date: Wed, 4 Mar 2026 00:50:44 -0800 Subject: [PATCH 1/5] workaround solution --- packaging/pre_build_script.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index b9046aa81c5..0cba8debe57 100644 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -40,3 +40,7 @@ fi pip install numpy pyyaml future ninja pip install --upgrade setuptools==72.1.0 + +if [[ "$OSTYPE" == "msys" ]]; then + echo "MAX_JOBS=1" >> "${GITHUB_ENV}" +fi From c64845ea94013b4140bca817ea821385fded604a Mon Sep 17 00:00:00 2001 From: Zhitao Yu Date: Wed, 4 Mar 2026 01:53:31 -0800 Subject: [PATCH 2/5] further fix --- packaging/pre_build_script.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index 0cba8debe57..3cc4b92d4bc 100644 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -42,5 +42,12 @@ pip install numpy pyyaml future ninja pip install --upgrade setuptools==72.1.0 if [[ "$OSTYPE" == "msys" ]]; then - echo "MAX_JOBS=1" >> "${GITHUB_ENV}" + echo "MAX_JOBS=1" >> "${GITHUB_ENV}" + # Explicitly add CUDA bin to PATH so nvcc is findable by ninja subprocesses + # regardless of how conda 25.x handles environment inheritance + CUDA_PATH_WIN=$(cmd //c "echo %CUDA_PATH%" 2>/dev/null | tr -d '\r') + if [[ -n "$CUDA_PATH_WIN" ]]; then + CUDA_BIN=$(cygpath -u "${CUDA_PATH_WIN}/bin") + echo "PATH=${CUDA_BIN}:${PATH}" >> "${GITHUB_ENV}" + fi fi From 2863b01af4d2d2ba58479eeeaaf070697f53cf28 Mon Sep 17 00:00:00 2001 From: Zhitao Yu Date: Fri, 6 Mar 2026 00:29:35 -0800 Subject: [PATCH 3/5] finding the offending commit of test-infra repo --- .github/workflows/build-wheels-windows.yml | 8 ++++---- packaging/pre_build_script.sh | 11 ----------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-wheels-windows.yml b/.github/workflows/build-wheels-windows.yml index cadc5542a9f..2ac7b38a90a 100644 --- a/.github/workflows/build-wheels-windows.yml +++ b/.github/workflows/build-wheels-windows.yml @@ -19,12 +19,12 @@ permissions: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@417d17c019ed248404ba85f7af7c54befe20f0eb with: package-type: wheel os: windows test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: 417d17c019ed248404ba85f7af7c54befe20f0eb with-xpu: enable build: needs: generate-matrix @@ -39,12 +39,12 @@ jobs: smoke-test-script: test/smoke_test.py package-name: torchvision name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@main + uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@417d17c019ed248404ba85f7af7c54befe20f0eb with: repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: main + test-infra-ref: 417d17c019ed248404ba85f7af7c54befe20f0eb build-matrix: ${{ needs.generate-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} env-script: ${{ matrix.env-script }} diff --git a/packaging/pre_build_script.sh b/packaging/pre_build_script.sh index 3cc4b92d4bc..b9046aa81c5 100644 --- a/packaging/pre_build_script.sh +++ b/packaging/pre_build_script.sh @@ -40,14 +40,3 @@ fi pip install numpy pyyaml future ninja pip install --upgrade setuptools==72.1.0 - -if [[ "$OSTYPE" == "msys" ]]; then - echo "MAX_JOBS=1" >> "${GITHUB_ENV}" - # Explicitly add CUDA bin to PATH so nvcc is findable by ninja subprocesses - # regardless of how conda 25.x handles environment inheritance - CUDA_PATH_WIN=$(cmd //c "echo %CUDA_PATH%" 2>/dev/null | tr -d '\r') - if [[ -n "$CUDA_PATH_WIN" ]]; then - CUDA_BIN=$(cygpath -u "${CUDA_PATH_WIN}/bin") - echo "PATH=${CUDA_BIN}:${PATH}" >> "${GITHUB_ENV}" - fi -fi From 89bd3100cf75edc707dd7944231bfa0b322c5d5c Mon Sep 17 00:00:00 2001 From: Zhitao Yu Date: Fri, 6 Mar 2026 01:02:05 -0800 Subject: [PATCH 4/5] finding the offending commit of test-infra repo 1 --- .github/workflows/build-wheels-windows.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build-wheels-windows.yml b/.github/workflows/build-wheels-windows.yml index 2ac7b38a90a..4e2460f924d 100644 --- a/.github/workflows/build-wheels-windows.yml +++ b/.github/workflows/build-wheels-windows.yml @@ -52,7 +52,3 @@ jobs: package-name: ${{ matrix.package-name }} smoke-test-script: ${{ matrix.smoke-test-script }} trigger-event: ${{ github.event_name }} - secrets: - R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }} - R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} - R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} From cfce0d79bd642a80fec0d2a10b03e04313ca6c4e Mon Sep 17 00:00:00 2001 From: Zhitao Yu Date: Fri, 6 Mar 2026 01:19:19 -0800 Subject: [PATCH 5/5] finding the offending commit of test-infra repo 2 --- .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 4e2460f924d..4e182bfecd5 100644 --- a/.github/workflows/build-wheels-windows.yml +++ b/.github/workflows/build-wheels-windows.yml @@ -19,12 +19,12 @@ permissions: jobs: generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@417d17c019ed248404ba85f7af7c54befe20f0eb + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@a79eb7c044afe4ceb7699acf3ba38e4bd19e4811 with: package-type: wheel os: windows test-infra-repository: pytorch/test-infra - test-infra-ref: 417d17c019ed248404ba85f7af7c54befe20f0eb + test-infra-ref: a79eb7c044afe4ceb7699acf3ba38e4bd19e4811 with-xpu: enable build: needs: generate-matrix @@ -39,12 +39,12 @@ jobs: smoke-test-script: test/smoke_test.py package-name: torchvision name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@417d17c019ed248404ba85f7af7c54befe20f0eb + uses: pytorch/test-infra/.github/workflows/build_wheels_windows.yml@a79eb7c044afe4ceb7699acf3ba38e4bd19e4811 with: repository: ${{ matrix.repository }} ref: "" test-infra-repository: pytorch/test-infra - test-infra-ref: 417d17c019ed248404ba85f7af7c54befe20f0eb + test-infra-ref: a79eb7c044afe4ceb7699acf3ba38e4bd19e4811 build-matrix: ${{ needs.generate-matrix.outputs.matrix }} pre-script: ${{ matrix.pre-script }} env-script: ${{ matrix.env-script }}