Skip to content

Commit 202081f

Browse files
authored
Merge branch 'pytorch:main' into main
2 parents b367f2e + 124dfa4 commit 202081f

File tree

179 files changed

+3848
-2050
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+3848
-2050
lines changed

.github/scripts/cmake.sh

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ else
3030
JOBS=$(nproc)
3131
fi
3232

33+
if [[ $OS_TYPE == linux ]]; then
34+
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
35+
fi
36+
3337
TORCH_PATH=$(python -c "import pathlib, torch; print(pathlib.Path(torch.__path__[0]))")
3438
if [[ $OS_TYPE == windows ]]; then
3539
PACKAGING_DIR="${PWD}/packaging"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
export IS_M1_CONDA_BUILD_JOB=1

.github/scripts/setup-env.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ conda create \
3030
python="${PYTHON_VERSION}" pip \
3131
ninja cmake \
3232
libpng \
33+
libwebp \
3334
'ffmpeg<4.3'
3435
conda activate ci
3536
conda install --quiet --yes libjpeg-turbo -c pytorch
36-
pip install --progress-bar=off --upgrade setuptools
37+
pip install --progress-bar=off --upgrade setuptools==72.1.0
3738

3839
# See https://github.com/pytorch/vision/issues/6790
3940
if [[ "${PYTHON_VERSION}" != "3.11" ]]; then
@@ -44,11 +45,7 @@ echo '::endgroup::'
4445

4546
if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then
4647
echo '::group::Install VisualStudio CUDA extensions on Windows'
47-
if [[ "${VC_YEAR:-}" == "2022" ]]; then
48-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
49-
else
50-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
51-
fi
48+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
5249
mkdir -p "${TARGET_DIR}"
5350
cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}"
5451
echo '::endgroup::'
@@ -101,6 +98,11 @@ echo '::group::Install TorchVision'
10198
python setup.py develop
10299
echo '::endgroup::'
103100

101+
echo '::group::Install torchvision-extra-decoders'
102+
# This can be done after torchvision was built
103+
pip install torchvision-extra-decoders
104+
echo '::endgroup::'
105+
104106
echo '::group::Collect environment information'
105107
conda list
106108
python -m torch.utils.collect_env

.github/workflows/build-cmake.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ jobs:
2020
gpu-arch-type: cuda
2121
gpu-arch-version: "11.8"
2222
fail-fast: false
23-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
23+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
24+
permissions:
25+
id-token: write
26+
contents: read
2427
with:
2528
repository: pytorch/vision
2629
runner: ${{ matrix.runner }}
@@ -30,10 +33,9 @@ jobs:
3033
script: |
3134
set -euo pipefail
3235
33-
export PYTHON_VERSION=3.8
36+
export PYTHON_VERSION=3.9
3437
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
3538
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
36-
3739
./.github/scripts/cmake.sh
3840
3941
macos:
@@ -50,7 +52,7 @@ jobs:
5052
script: |
5153
set -euo pipefail
5254
53-
export PYTHON_VERSION=3.8
55+
export PYTHON_VERSION=3.9
5456
export GPU_ARCH_TYPE=cpu
5557
export GPU_ARCH_VERSION=''
5658
@@ -76,7 +78,7 @@ jobs:
7678
script: |
7779
set -euo pipefail
7880
79-
export PYTHON_VERSION=3.8
81+
export PYTHON_VERSION=3.9
8082
export VC_YEAR=2022
8183
export VSDEVCMD_ARGS=""
8284
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}

.github/workflows/build-conda-linux.yml

-52
This file was deleted.

.github/workflows/build-conda-m1.yml

-53
This file was deleted.

.github/workflows/build-conda-windows.yml

-52
This file was deleted.

.github/workflows/build-wheels-linux.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
os: linux
2626
test-infra-repository: pytorch/test-infra
2727
test-infra-ref: main
28+
with-xpu: enable
2829
build:
2930
needs: generate-matrix
3031
strategy:

.github/workflows/build-wheels-windows.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
os: windows
2626
test-infra-repository: pytorch/test-infra
2727
test-infra-ref: main
28+
with-xpu: enable
2829
build:
2930
needs: generate-matrix
3031
strategy:

.github/workflows/docs.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ on:
1414

1515
jobs:
1616
build:
17-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
17+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
18+
permissions:
19+
id-token: write
20+
contents: read
1821
with:
1922
repository: pytorch/vision
2023
upload-artifact: docs
2124
test-infra-ref: main
2225
script: |
2326
set -euo pipefail
2427
25-
export PYTHON_VERSION=3.8
28+
export PYTHON_VERSION=3.10
2629
export GPU_ARCH_TYPE=cpu
2730
export GPU_ARCH_VERSION=''
2831
./.github/scripts/setup-env.sh
@@ -57,7 +60,7 @@ jobs:
5760
sed -i -e 's/-j auto/-j 1/' Makefile
5861
make html
5962
60-
# Below is an imperfect way for us to add "try on collab" links to all of our gallery examples.
63+
# Below is an imperfect way for us to add "try on Colab" links to all of our gallery examples.
6164
# sphinx-gallery will convert all gallery examples to .ipynb notebooks and stores them in
6265
# build/html/_downloads/<some_hash>/<example_name>.ipynb
6366
# We copy all those ipynb files in a more convenient folder so that we can more easily link to them.
@@ -77,11 +80,12 @@ jobs:
7780
7881
upload:
7982
needs: build
80-
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
83+
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
8184
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
85+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8286
permissions:
87+
id-token: write
8388
contents: write
84-
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
8589
with:
8690
repository: pytorch/vision
8791
download-artifact: docs

0 commit comments

Comments
 (0)