Repository navigation
Commit 6df4ed1
test(cuda.core): freeze the collected heap once so the per-test gc.collect() stops walking it
#2484 added `gc.collect()` plus `cuCtxSynchronize()` to every `init_cuda` teardown so that each test's garbage is drained before the context is popped (#2381). That collect walks the whole heap on every teardown, including the roughly 4,600 collected test items and the imported modules, which never become garbage during a session. In a single measurement run on one L40S GPU (not a CI runner) the collect costs 59 ms median per teardown; the sync costs 0.03 ms. CI step timestamps of run 30938115056 and run 30953896252 show the "Run cuda.core tests" step going from 144 s to 237 s at that commit on the same L4 row.
Co-Authored-By: Claude Fable 5.1 <[email protected]>1 parent 5078fe6 commit 6df4ed1
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| |||
0 commit comments