Commit 0789bf6
test(cuda.core): share one DummyUnifiedMemoryResource per batched test
Both batched-advise tests previously created a throwaway
DummyUnifiedMemoryResource per allocation inside a list comprehension:
bufs = [DummyUnifiedMemoryResource(device).allocate(size) for _ in range(2)]
The Buffer holds a reference to the throwaway MR via mr=self, so the MR
should stay alive — but on CUDA 12.9.1 CI test_batched_same_advice fails
with bufs[0] showing ptr=0x0 size=0 (the post-close state). On CUDA 13
the same pattern works.
Switch to one MR shared across both allocations. This is cleaner anyway
and removes the throwaway-per-iteration pattern as a possible source of
the cu12 issue. If the failure persists, we'll know the MR lifetime
wasn't the cause.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 782f6a9 commit 0789bf6
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2242 | 2242 | | |
2243 | 2243 | | |
2244 | 2244 | | |
2245 | | - | |
| 2245 | + | |
| 2246 | + | |
2246 | 2247 | | |
2247 | 2248 | | |
2248 | 2249 | | |
| |||
2260 | 2261 | | |
2261 | 2262 | | |
2262 | 2263 | | |
2263 | | - | |
| 2264 | + | |
| 2265 | + | |
2264 | 2266 | | |
2265 | 2267 | | |
2266 | 2268 | | |
| |||
0 commit comments