Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove trailing _tensor from image kernel checks #7908

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/test_transforms_v2_refactored.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def _compute_output_size(self, *, input_size, size, max_size):
@pytest.mark.parametrize("antialias", [True, False])
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, size, interpolation, use_max_size, antialias, dtype, device):
def test_kernel_image(self, size, interpolation, use_max_size, antialias, dtype, device):
if not (max_size_kwarg := self._make_max_size_kwarg(use_max_size=use_max_size, size=size)):
return

Expand Down Expand Up @@ -830,7 +830,7 @@ def test_float16_no_rounding(self):
class TestHorizontalFlip:
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, dtype, device):
def test_kernel_image(self, dtype, device):
check_kernel(F.horizontal_flip_image, make_image(dtype=dtype, device=device))

@pytest.mark.parametrize("format", list(tv_tensors.BoundingBoxFormat))
Expand Down Expand Up @@ -980,7 +980,7 @@ def _check_kernel(self, kernel, input, *args, **kwargs):
)
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, param, value, dtype, device):
def test_kernel_image(self, param, value, dtype, device):
if param == "fill":
value = adapt_fill(value, dtype=dtype)
self._check_kernel(
Expand Down Expand Up @@ -1280,7 +1280,7 @@ def test_transform_unknown_fill_error(self):
class TestVerticalFlip:
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, dtype, device):
def test_kernel_image(self, dtype, device):
check_kernel(F.vertical_flip_image, make_image(dtype=dtype, device=device))

@pytest.mark.parametrize("format", list(tv_tensors.BoundingBoxFormat))
Expand Down Expand Up @@ -1404,7 +1404,7 @@ class TestRotate:
)
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, param, value, dtype, device):
def test_kernel_image(self, param, value, dtype, device):
kwargs = {param: value}
if param != "angle":
kwargs["angle"] = self._MINIMAL_AFFINE_KWARGS["angle"]
Expand Down Expand Up @@ -2382,7 +2382,7 @@ def _make_displacement(self, inpt):
)
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
@pytest.mark.parametrize("device", cpu_and_cuda())
def test_kernel_image_tensor(self, param, value, dtype, device):
def test_kernel_image(self, param, value, dtype, device):
image = make_image_tensor(dtype=dtype, device=device)

check_kernel(
Expand Down