Skip to content

Commit 8f73afa

Browse files
authored
Remove 3.8 support (#8552)
1 parent d535408 commit 8f73afa

File tree

9 files changed

+18
-30
lines changed

9 files changed

+18
-30
lines changed

.github/workflows/build-cmake.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
script: |
3131
set -euo pipefail
3232
33-
export PYTHON_VERSION=3.8
33+
export PYTHON_VERSION=3.9
3434
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
3535
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
3636
@@ -50,7 +50,7 @@ jobs:
5050
script: |
5151
set -euo pipefail
5252
53-
export PYTHON_VERSION=3.8
53+
export PYTHON_VERSION=3.9
5454
export GPU_ARCH_TYPE=cpu
5555
export GPU_ARCH_VERSION=''
5656
@@ -76,7 +76,7 @@ jobs:
7676
script: |
7777
set -euo pipefail
7878
79-
export PYTHON_VERSION=3.8
79+
export PYTHON_VERSION=3.9
8080
export VC_YEAR=2022
8181
export VSDEVCMD_ARGS=""
8282
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
script: |
2323
set -euo pipefail
2424
25-
export PYTHON_VERSION=3.8
25+
export PYTHON_VERSION=3.10
2626
export GPU_ARCH_TYPE=cpu
2727
export GPU_ARCH_VERSION=''
2828
./.github/scripts/setup-env.sh

.github/workflows/lint.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
echo '::group::Setup environment'
2222
CONDA_PATH=$(which conda)
2323
eval "$(${CONDA_PATH} shell.bash hook)"
24-
conda create --name ci --quiet --yes python=3.8 pip
24+
conda create --name ci --quiet --yes python=3.9 pip
2525
conda activate ci
2626
echo '::endgroup::'
2727
@@ -48,22 +48,14 @@ jobs:
4848
echo '::group::Setup environment'
4949
CONDA_PATH=$(which conda)
5050
eval "$(${CONDA_PATH} shell.bash hook)"
51-
# clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda
52-
# and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge
53-
# channel. Since we are not building or testing here, this is fine.
54-
conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc
51+
conda create --name ci --quiet --yes -c conda-forge python=3.9 clang-format
5552
conda activate ci
56-
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
5753
echo '::endgroup::'
5854
59-
echo '::group::Install lint tools'
60-
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format
61-
chmod +x ./clang-format
62-
echo '::endgroup::'
6355
6456
echo '::group::Lint C source'
6557
set +e
66-
./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format --exclude "torchvision/csrc/io/image/cpu/giflib/*"
58+
./.github/scripts/run-clang-format.py -r torchvision/csrc --exclude "torchvision/csrc/io/image/cpu/giflib/*"
6759
6860
if [ $? -ne 0 ]; then
6961
git --no-pager diff
@@ -80,7 +72,7 @@ jobs:
8072
script: |
8173
set -euo pipefail
8274
83-
export PYTHON_VERSION=3.8
75+
export PYTHON_VERSION=3.9
8476
export GPU_ARCH_TYPE=cpu
8577
export GPU_ARCH_VERSION=''
8678

.github/workflows/prototype-tests-linux-gpu.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version:
14-
- "3.8"
1514
- "3.9"
1615
- "3.10"
1716
- "3.11"
1817
- "3.12"
1918
runner: ["linux.12xlarge"]
2019
gpu-arch-type: ["cpu"]
2120
include:
22-
- python-version: "3.8"
21+
- python-version: "3.9"
2322
runner: linux.g5.4xlarge.nvidia.gpu
2423
gpu-arch-type: cuda
2524
gpu-arch-version: "11.8"

.github/workflows/tests-schedule.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up python
1919
uses: actions/setup-python@v2
2020
with:
21-
python-version: 3.8
21+
python-version: 3.9
2222

2323
- name: Upgrade system packages
2424
run: python -m pip install --upgrade pip setuptools wheel

.github/workflows/tests.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- "3.8"
1817
- "3.9"
1918
- "3.10"
2019
- "3.11"
2120
- "3.12"
2221
runner: ["linux.12xlarge"]
2322
gpu-arch-type: ["cpu"]
2423
include:
25-
- python-version: 3.8
24+
- python-version: 3.9
2625
runner: linux.g5.4xlarge.nvidia.gpu
2726
gpu-arch-type: cuda
2827
gpu-arch-version: "11.8"
@@ -48,7 +47,6 @@ jobs:
4847
strategy:
4948
matrix:
5049
python-version:
51-
- "3.8"
5250
- "3.9"
5351
- "3.10"
5452
- "3.11"
@@ -74,15 +72,14 @@ jobs:
7472
strategy:
7573
matrix:
7674
python-version:
77-
- "3.8"
7875
- "3.9"
7976
- "3.10"
8077
- "3.11"
8178
- "3.12"
8279
runner: ["windows.4xlarge"]
8380
gpu-arch-type: ["cpu"]
8481
include:
85-
- python-version: "3.8"
82+
- python-version: "3.9"
8683
runner: windows.g5.4xlarge.nvidia.gpu
8784
gpu-arch-type: cuda
8885
gpu-arch-version: "11.8"
@@ -114,7 +111,7 @@ jobs:
114111
script: |
115112
set -euo pipefail
116113
117-
export PYTHON_VERSION=3.8
114+
export PYTHON_VERSION=3.10
118115
export GPU_ARCH_TYPE=cpu
119116
export GPU_ARCH_VERSION=''
120117
@@ -130,7 +127,7 @@ jobs:
130127
echo '::endgroup::'
131128
132129
echo '::group::Install testing utilities'
133-
pip install --progress-bar=off pytest
130+
pip install --progress-bar=off pytest "numpy<2"
134131
echo '::endgroup::'
135132
136133
echo '::group::Run ONNX tests'
@@ -146,7 +143,7 @@ jobs:
146143
script: |
147144
set -euo pipefail
148145
149-
export PYTHON_VERSION=3.8
146+
export PYTHON_VERSION=3.9
150147
export GPU_ARCH_TYPE=cpu
151148
export GPU_ARCH_VERSION=''
152149

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ versions.
2020

2121
| `torch` | `torchvision` | Python |
2222
| ------------------ | ------------------ | ------------------- |
23-
| `main` / `nightly` | `main` / `nightly` | `>=3.8`, `<=3.12` |
23+
| `main` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` |
2424
| `2.4` | `0.19` | `>=3.8`, `<=3.12` |
2525
| `2.3` | `0.18` | `>=3.8`, `<=3.12` |
2626
| `2.2` | `0.17` | `>=3.8`, `<=3.11` |

test/test_ops.py

-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ def test_autocast(self, aligned, deterministic, x_dtype, rois_dtype):
513513
@pytest.mark.parametrize("x_dtype", (torch.float, torch.bfloat16))
514514
@pytest.mark.parametrize("rois_dtype", (torch.float, torch.bfloat16))
515515
def test_autocast_cpu(self, aligned, deterministic, x_dtype, rois_dtype):
516-
517516
with torch.cpu.amp.autocast():
518517
self.test_forward(
519518
torch.device("cpu"),

torchvision/csrc/io/decoder/gpu/decoder.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ int Decoder::handle_picture_display(CUVIDPARSERDISPINFO* disp_info) {
143143
uint8_t* frame_ptr = decoded_frame.data_ptr<uint8_t>();
144144
const uint8_t* const source_arr[] = {
145145
(const uint8_t* const)source_frame,
146-
(const uint8_t* const)(source_frame + source_pitch * ((surface_height + 1) & ~1))};
146+
(const uint8_t* const)(source_frame +
147+
source_pitch * ((surface_height + 1) & ~1))};
147148

148149
auto err = nppiNV12ToRGB_709CSC_8u_P2C3R(
149150
source_arr,

0 commit comments

Comments
 (0)