Skip to content

CI jobs broken due to upstream changes on padding and stride #5873

@datumbox

Description

@datumbox

🐛 Describe the bug

The latest main seems broken potentially due to upstream changes on PyTorch's core. I believe the problem was introduced due to the changes on pad at pytorch/pytorch#73433 and on stride at pytorch/pytorch#72962

Here are different failures we get:

test_pad[1-edge-cpu]:
Traceback (most recent call last):
  File "/root/project/test/test_transforms_tensor.py", line 205, in test_pad
    _test_functional_op(F.pad, fn_kwargs={"padding": mul * 2, "fill": fill, "padding_mode": m}, device=device)
  File "/root/project/test/test_transforms_tensor.py", line 54, in _test_functional_op
    transformed_tensor = f(tensor, **fn_kwargs)
  File "/root/project/torchvision/transforms/functional.py", line 480, in pad
    return F_t.pad(img, padding=padding, fill=fill, padding_mode=padding_mode)
  File "/root/project/torchvision/transforms/functional_tensor.py", line 415, in pad
    img = torch_pad(img, p, mode=padding_mode, value=float(fill))
RuntimeError: Padding mode "replicate" doesn't take in value argument
test_pad[1-reflect-cpu]
Traceback (most recent call last):
  File "/root/project/test/test_transforms_tensor.py", line 205, in test_pad
    _test_functional_op(F.pad, fn_kwargs={"padding": mul * 2, "fill": fill, "padding_mode": m}, device=device)
  File "/root/project/test/test_transforms_tensor.py", line 54, in _test_functional_op
    transformed_tensor = f(tensor, **fn_kwargs)
  File "/root/project/torchvision/transforms/functional.py", line 480, in pad
    return F_t.pad(img, padding=padding, fill=fill, padding_mode=padding_mode)
  File "/root/project/torchvision/transforms/functional_tensor.py", line 415, in pad
    img = torch_pad(img, p, mode=padding_mode, value=float(fill))
RuntimeError: Padding mode "reflect" doesn't take in value argument
test_color_jitter_all[3-cpu-9]:
Traceback (most recent call last):
  File "/root/project/test/test_transforms_tensor.py", line 194, in test_color_jitter_all
    channels=channels,
  File "/root/project/test/test_transforms_tensor.py", line 86, in _test_class_op
    _test_transform_vs_scripted_on_batch(f, scripted_fn, batch_tensors)
  File "/root/project/test/test_transforms_tensor.py", line 46, in _test_transform_vs_scripted_on_batch
    s_transformed_batch = s_transform(batch_tensors)
  File "/root/project/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1129, in _call_impl
    return forward_call(*input, **kwargs)
RuntimeError: The following operation failed in the TorchScript interpreter.
Traceback of TorchScript (most recent call last):
RuntimeError: is_tensor_creation || ((is_contiguous ^ is_channels_last_contiguous) && (is_contiguous || is_channels_last_contiguous)) INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1650784222208/work/torch/csrc/jit/tensorexpr/kernel.cpp":519, please report a bug to PyTorch.

Versions

Latest main e99278a

cc @seemethere

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions