(N)
| 46 | |
| 47 | @pytest.mark.parametrize("N", [16, 64, 128, 256]) |
| 48 | def test_argsort_descending(N): # noqa: N803 |
| 49 | x = torch.randn(N, dtype=torch.float32, device="cuda") |
| 50 | out_vals = torch.empty_like(x) |
| 51 | out_ids = torch.empty(N, dtype=torch.int32, device="cuda") |
| 52 | |
| 53 | argsort_desc_kernel[(1,)](x, out_vals, out_ids, N=N) |
| 54 | |
| 55 | expected_vals, expected_ids = torch.sort(x, descending=True) |
| 56 | assert torch.allclose(out_vals, expected_vals) |
| 57 | assert torch.equal(out_ids, expected_ids.to(torch.int32)) |
| 58 | |
| 59 | |
| 60 | @pytest.mark.parametrize("N", [16, 64, 128, 256]) |
nothing calls this directly
no outgoing calls
no test coverage detected