Commit 27b309f
test(memory): add direct is_managed coverage for ManagedMemoryResource
The existing test_managed_buffer_dlpack_roundtrip_device_type uses a
DummyUnifiedMemoryResource backed by cuMemAllocManaged, which sets
CU_POINTER_ATTRIBUTE_IS_MANAGED and so never exercised the pool-allocated
path that surfaced the bug.
Add two targeted tests:
- test_managed_memory_resource_buffer_dlpack_device_type: allocates from
ManagedMemoryResource (cuMemAllocFromPoolAsync on a managed pool) and
asserts is_managed and kDLCUDAManaged through Buffer and view.
- test_non_managed_resources_report_not_managed: parametrized smoke test
ensuring DeviceMemoryResource and PinnedMemoryResource still report
is_managed=False so the new MemoryResource.is_managed default does not
silently misclassify non-managed resources.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 384c5c5 commit 27b309f
1 file changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
608 | 653 | | |
609 | 654 | | |
610 | 655 | | |
| |||
0 commit comments