Skip to content

Commit 849318a

Browse files
author
pytorchbot
committed
2025-06-24 nightly release (89f5855)
1 parent c56574e commit 849318a

File tree

6 files changed

+15
-69
lines changed

6 files changed

+15
-69
lines changed

.github/workflows/build-cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
gpu-arch-type: cpu
1919
- runner: linux.g5.4xlarge.nvidia.gpu
2020
gpu-arch-type: cuda
21-
gpu-arch-version: "11.8"
21+
gpu-arch-version: "12.6"
2222
fail-fast: false
2323
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
2424
permissions:
@@ -66,7 +66,7 @@ jobs:
6666
gpu-arch-type: cpu
6767
- runner: windows.g5.4xlarge.nvidia.gpu
6868
gpu-arch-type: cuda
69-
gpu-arch-version: "11.8"
69+
gpu-arch-version: "12.6"
7070
fail-fast: false
7171
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
7272
with:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- python-version: "3.9"
2222
runner: linux.g5.4xlarge.nvidia.gpu
2323
gpu-arch-type: cuda
24-
gpu-arch-version: "11.8"
24+
gpu-arch-version: "12.6"
2525
fail-fast: false
2626
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
2727
permissions:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- python-version: 3.9
2525
runner: linux.g5.4xlarge.nvidia.gpu
2626
gpu-arch-type: cuda
27-
gpu-arch-version: "11.8"
27+
gpu-arch-version: "12.6"
2828
fail-fast: false
2929
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3030
permissions:

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ instructions](https://pytorch.org/get-started/locally/). Note that the official
3838
instructions may ask you to install torchvision itself. If you are doing development
3939
on torchvision, you should not install prebuilt torchvision packages.
4040

41-
**Optionally**, install `libpng` and `libjpeg-turbo` if you want to enable
41+
**Optionally**, install `libpng`, `libjpeg-turbo` and `libwebp` if you want to enable
4242
support for
43-
native encoding / decoding of PNG and JPEG formats in
43+
native encoding / decoding of PNG, JPEG and WebP formats in
4444
[torchvision.io](https://pytorch.org/vision/stable/io.html#image):
4545

4646
```bash
47-
conda install libpng libjpeg-turbo -c pytorch
47+
conda install libpng libjpeg-turbo libwebp -c pytorch
4848
```
4949

5050
Note: you can use the `TORCHVISION_INCLUDE` and `TORCHVISION_LIBRARY`

test/test_ops.py

Lines changed: 7 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,67 +1201,13 @@ def test_forward_scriptability(self):
12011201
torch.jit.script(ops.DeformConv2d(in_channels=8, out_channels=8, kernel_size=3))
12021202

12031203

1204-
@pytest.mark.parametrize("dtype", (torch.float16, torch.float32, torch.float64))
1205-
@pytest.mark.parametrize("device", cpu_and_cuda())
1206-
@pytest.mark.parametrize("requires_grad", (True, False))
1207-
def test_deform_conv2d_opcheck(dtype, device, requires_grad):
1208-
batch_size, channels_in, height, width = 1, 6, 10, 10
1209-
kernel_size = (3, 3)
1210-
stride = (1, 1)
1211-
padding = (1, 1)
1212-
dilation = (1, 1)
1213-
groups = 2
1214-
out_channels = 4
1215-
out_h = (height + 2 * padding[0] - dilation[0] * (kernel_size[0] - 1) - 1) // stride[0] + 1
1216-
out_w = (width + 2 * padding[1] - dilation[1] * (kernel_size[1] - 1) - 1) // stride[1] + 1
1217-
x = torch.randn(batch_size, channels_in, height, width, dtype=dtype, device=device, requires_grad=requires_grad)
1218-
offset = torch.randn(
1219-
batch_size,
1220-
2 * kernel_size[0] * kernel_size[1],
1221-
out_h,
1222-
out_w,
1223-
dtype=dtype,
1224-
device=device,
1225-
requires_grad=requires_grad,
1226-
)
1227-
weight = torch.randn(
1228-
out_channels,
1229-
channels_in // groups,
1230-
kernel_size[0],
1231-
kernel_size[1],
1232-
dtype=dtype,
1233-
device=device,
1234-
requires_grad=requires_grad,
1235-
)
1236-
bias = torch.randn(out_channels, dtype=dtype, device=device, requires_grad=requires_grad)
1237-
use_mask = True
1238-
mask = torch.sigmoid(
1239-
torch.randn(
1240-
batch_size,
1241-
kernel_size[0] * kernel_size[1],
1242-
out_h,
1243-
out_w,
1244-
dtype=dtype,
1245-
device=device,
1246-
requires_grad=requires_grad,
1247-
)
1248-
)
1249-
kwargs = {
1250-
"offset": offset,
1251-
"weight": weight,
1252-
"bias": bias,
1253-
"stride_h": stride[0],
1254-
"stride_w": stride[1],
1255-
"pad_h": padding[0],
1256-
"pad_w": padding[1],
1257-
"dilation_h": dilation[0],
1258-
"dilation_w": dilation[1],
1259-
"groups": groups,
1260-
"offset_groups": 1,
1261-
"use_mask": use_mask,
1262-
"mask": mask, # no modulation in this test
1263-
}
1264-
optests.opcheck(torch.ops.torchvision.deform_conv2d, args=(x,), kwargs=kwargs)
1204+
optests.generate_opcheck_tests(
1205+
testcase=TestDeformConv,
1206+
namespaces=["torchvision"],
1207+
failures_dict_path=os.path.join(os.path.dirname(__file__), "optests_failures_dict.json"),
1208+
additional_decorators=[],
1209+
test_utils=OPTESTS,
1210+
)
12651211

12661212

12671213
class TestFrozenBNT:

torchvision/tv_tensors/_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __new__(
4343

4444
tensor = cls._to_tensor(data, dtype=dtype, device=device, requires_grad=requires_grad)
4545
if tensor.ndim < 2:
46-
raise ValueError
46+
raise ValueError(f"Tensor must be 2D or higher, got {tensor.ndim}D tensor.")
4747
elif tensor.ndim == 2:
4848
tensor = tensor.unsqueeze(0)
4949

0 commit comments

Comments
 (0)