Skip to content

Commit

Permalink
Merge branch 'main' into please_dont_modify_this_branch_unless_you_ar…
Browse files Browse the repository at this point in the history
…e_just_merging_with_main_
  • Loading branch information
NicolasHug authored Aug 12, 2024
2 parents 6aeff4b + 8f73afa commit 766e9fb
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 30 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.9
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
Expand All @@ -50,7 +50,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.9
export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION=''
Expand All @@ -76,7 +76,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.9
export VC_YEAR=2022
export VSDEVCMD_ARGS=""
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.10
export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION=''
./.github/scripts/setup-env.sh
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
echo '::group::Setup environment'
CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)"
conda create --name ci --quiet --yes python=3.8 pip
conda create --name ci --quiet --yes python=3.9 pip
conda activate ci
echo '::endgroup::'
Expand All @@ -48,22 +48,14 @@ jobs:
echo '::group::Setup environment'
CONDA_PATH=$(which conda)
eval "$(${CONDA_PATH} shell.bash hook)"
# clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda
# and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge
# channel. Since we are not building or testing here, this is fine.
conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc
conda create --name ci --quiet --yes -c conda-forge python=3.9 clang-format
conda activate ci
export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}"
echo '::endgroup::'
echo '::group::Install lint tools'
curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format
chmod +x ./clang-format
echo '::endgroup::'
echo '::group::Lint C source'
set +e
./.github/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format --exclude "torchvision/csrc/io/image/cpu/giflib/*"
./.github/scripts/run-clang-format.py -r torchvision/csrc --exclude "torchvision/csrc/io/image/cpu/giflib/*"
if [ $? -ne 0 ]; then
git --no-pager diff
Expand All @@ -80,7 +72,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.9
export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION=''
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/prototype-tests-linux-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runner: ["linux.12xlarge"]
gpu-arch-type: ["cpu"]
include:
- python-version: "3.8"
- python-version: "3.9"
runner: linux.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "11.8"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.9

- name: Upgrade system packages
run: python -m pip install --upgrade pip setuptools wheel
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runner: ["linux.12xlarge"]
gpu-arch-type: ["cpu"]
include:
- python-version: 3.8
- python-version: 3.9
runner: linux.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "11.8"
Expand All @@ -48,7 +47,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
Expand All @@ -74,15 +72,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
runner: ["windows.4xlarge"]
gpu-arch-type: ["cpu"]
include:
- python-version: "3.8"
- python-version: "3.9"
runner: windows.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "11.8"
Expand Down Expand Up @@ -114,7 +111,7 @@ jobs:
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.10
export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION=''
Expand All @@ -130,7 +127,7 @@ jobs:
echo '::endgroup::'
echo '::group::Install testing utilities'
pip install --progress-bar=off pytest
pip install --progress-bar=off pytest "numpy<2"
echo '::endgroup::'
echo '::group::Run ONNX tests'
Expand All @@ -139,13 +136,14 @@ jobs:
unittests-extended:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
if: contains(github.event.pull_request.labels.*.name, 'run-extended')
with:
repository: pytorch/vision
test-infra-ref: main
script: |
set -euo pipefail
export PYTHON_VERSION=3.8
export PYTHON_VERSION=3.9
export GPU_ARCH_TYPE=cpu
export GPU_ARCH_VERSION=''
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ versions.

| `torch` | `torchvision` | Python |
| ------------------ | ------------------ | ------------------- |
| `main` / `nightly` | `main` / `nightly` | `>=3.8`, `<=3.12` |
| `main` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` |
| `2.4` | `0.19` | `>=3.8`, `<=3.12` |
| `2.3` | `0.18` | `>=3.8`, `<=3.12` |
| `2.2` | `0.17` | `>=3.8`, `<=3.11` |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
f"``weights='DEFAULT'`` or ``weights='{str(list(obj)[0]).split('.')[1]}'``.",
]

if obj.__doc__ != "An enumeration.":
if obj.__doc__ is not None and obj.__doc__ != "An enumeration.":
# We only show the custom enum doc if it was overridden. The default one from Python is "An enumeration"
lines.append("")
lines.append(obj.__doc__)
Expand Down
1 change: 1 addition & 0 deletions test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ def test_autocast(self, aligned, deterministic, x_dtype, rois_dtype):
rois_dtype=rois_dtype,
)

@pytest.mark.skip(reason="1/5000 flaky failure")
@pytest.mark.parametrize("aligned", (True, False))
@pytest.mark.parametrize("deterministic", (True, False))
@pytest.mark.parametrize("x_dtype", (torch.float, torch.bfloat16))
Expand Down
3 changes: 2 additions & 1 deletion torchvision/csrc/io/decoder/gpu/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ int Decoder::handle_picture_display(CUVIDPARSERDISPINFO* disp_info) {
uint8_t* frame_ptr = decoded_frame.data_ptr<uint8_t>();
const uint8_t* const source_arr[] = {
(const uint8_t* const)source_frame,
(const uint8_t* const)(source_frame + source_pitch * ((surface_height + 1) & ~1))};
(const uint8_t* const)(source_frame +
source_pitch * ((surface_height + 1) & ~1))};

auto err = nppiNV12ToRGB_709CSC_8u_P2C3R(
source_arr,
Expand Down

0 comments on commit 766e9fb

Please sign in to comment.