Skip to content

Commit 84db682

Browse files
committed
test(cuda.core): use shared instrumentation for closed streams
1 parent 6737bfa commit 84db682

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cuda_core/tests/test_memory.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,8 @@ def test_closed_deallocation_stream_does_not_mutate_buffer():
578578
device.set_current()
579579
initial_stream = device.create_stream()
580580
closed_stream = device.create_stream()
581-
mr = _StreamCaptureMemoryResource(device)
581+
CapturingMR, telemetry = make_instrumented_memory_resource(record_streams=True)
582+
mr = CapturingMR(device)
582583
buf = Buffer.from_handle(1, 1024, mr=mr, stream=initial_stream)
583584
closed_stream.close()
584585

@@ -591,8 +592,8 @@ def test_closed_deallocation_stream_does_not_mutate_buffer():
591592
assert buf
592593

593594
buf.close()
594-
assert len(mr.deallocation_streams) == 1
595-
assert mr.deallocation_streams[0].handle == initial_stream.handle
595+
assert len(telemetry["deallocations"]) == 1
596+
assert telemetry["deallocations"][0]["stream"].handle == initial_stream.handle
596597

597598

598599
@pytest.mark.agent_authored(model="gpt-5.6")

0 commit comments

Comments
 (0)