Uh oh!
There was an error while loading. Please reload this page.
Fix slow test_patterngen_seeds on Windows by sampling - #1461
Conversation
Andy-Jost
commented
Jan 12, 2026
/ok to test c48274e97305a4fc01080184a38cca3756dc82a9 |
| @@ -47,10 +47,6 @@ def test_latchkernel(): | |||
| log("done") | |||
| @pytest.mark.skipif( | |||
There was a problem hiding this comment.
I could leave this in if we want to continue skipping this test on Windows. It is not important to test this on every platform IMO.
Andy-Jost
commented
Jan 12, 2026
The test runs in 0.19s on Linux. |
This comment has been minimized.
This comment has been minimized.
| @@ -47,10 +47,6 @@ def test_latchkernel(): | |||
| log("done") | |||
| @pytest.mark.skipif( | |||
| pgen = PatternGen(device, NBYTES) | ||
| for i in range(256): | ||
| for i in range(0, 256, 17): |
There was a problem hiding this comment.
This isn't covering the usual trouble-maker corner case 1 anymore.
This would sample around the usual suspects (0, 1 corner case, then a couple around powers of 2):
(0, 1, 2, 3, 4, 5, 31, 32, 33, 127, 128, 129)
There was a problem hiding this comment.
OK, I included values <5 since those are the most common. I don't think there's anything special about powers of two in this case.
Replace exhaustive O(n²) pairwise seed testing with prime-stride sampling, reducing iterations from ~32k to ~100 while maintaining meaningful coverage. ClosesNVIDIA#1455
c48274e to
d39f754CompareAndy-Jost
commented
Jan 12, 2026
/ok to test d39f754 |
rwgk
left a comment
There was a problem hiding this comment.
That looks nice!
>>> n = 0
>>> for i in (ii for ii in range(0, 256) if ii < 5 or ii % 17 == 0):
... js = tuple(jj for jj in range(i + 1, 256) if jj < 5 or jj % 19 == 0)
... print(i, js)
... n += len(js)
...
0 (1, 2, 3, 4, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
1 (2, 3, 4, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
2 (3, 4, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
3 (4, 19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
4 (19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
17 (19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
34 (38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
51 (57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
68 (76, 95, 114, 133, 152, 171, 190, 209, 228, 247)
85 (95, 114, 133, 152, 171, 190, 209, 228, 247)
102 (114, 133, 152, 171, 190, 209, 228, 247)
119 (133, 152, 171, 190, 209, 228, 247)
136 (152, 171, 190, 209, 228, 247)
153 (171, 190, 209, 228, 247)
170 (171, 190, 209, 228, 247)
187 (190, 209, 228, 247)
204 (209, 228, 247)
221 (228, 247)
238 (247,)
255 ()
>>> print(n)
171
Andy-Jost
commented
Jan 12, 2026
/ok to test a4dcee1 |
Andy-Jost
commented
Jan 12, 2026
/ok to test d0454f2 |
d0454f2 to
f428279CompareAndy-Jost
commented
Jan 13, 2026
/ok to test f428279 |
Uh oh!
There was an error while loading. Please reload this page.
|
Summary
skipifIS_WINDOWSfortest_patterngen_seeds#1456, re-enabling the test on WindowsCloses#1455