(
shape: tuple[int, int],
device: torch.device,
)
| 16 | |
| 17 | |
| 18 | def generate_sample_grid( |
| 19 | shape: tuple[int, int], |
| 20 | device: torch.device, |
| 21 | ) -> Float[Tensor, "height width 2"]: |
| 22 | h, w = shape |
| 23 | x = torch.arange(w, device=device) + 0.5 |
| 24 | y = torch.arange(h, device=device) + 0.5 |
| 25 | x, y = torch.meshgrid(x, y, indexing="xy") |
| 26 | return torch.stack([x, y], dim=-1) |
| 27 | |
| 28 | |
| 29 | def detect_msaa_pixels( |
no outgoing calls
no test coverage detected