(self, param, value, dtype, device)
| 1439 | @pytest.mark.parametrize("dtype", [torch.float32, torch.uint8]) |
| 1440 | @pytest.mark.parametrize("device", cpu_and_cuda()) |
| 1441 | def test_kernel_image(self, param, value, dtype, device): |
| 1442 | if param == "fill": |
| 1443 | value = adapt_fill(value, dtype=dtype) |
| 1444 | self._check_kernel( |
| 1445 | F.affine_image, |
| 1446 | make_image(dtype=dtype, device=device), |
| 1447 | **{param: value}, |
| 1448 | check_scripted_vs_eager=not (param in {"shear", "fill"} and isinstance(value, (int, float))), |
| 1449 | check_cuda_vs_cpu=( |
| 1450 | dict(atol=1, rtol=0) |
| 1451 | if dtype is torch.uint8 and param == "interpolation" and value is transforms.InterpolationMode.BILINEAR |
| 1452 | else True |
| 1453 | ), |
| 1454 | ) |
| 1455 | |
| 1456 | @param_value_parametrization( |
| 1457 | angle=_EXHAUSTIVE_TYPE_AFFINE_KWARGS["angle"], |
nothing calls this directly
no test coverage detected