Commit 384c5c5
Fix is_managed reporting for pool-allocated managed memory
Pool-allocated managed memory via cuMemAllocFromPoolAsync (from a pool
created with CU_MEM_ALLOCATION_TYPE_MANAGED) does not set
CU_POINTER_ATTRIBUTE_IS_MANAGED=1. _query_memory_attrs therefore
classified the allocation as pinned host memory, causing
classify_dl_device to return kDLCUDAHost instead of kDLCUDAManaged.
CCCL's make_tma_descriptor only accepts kDLCUDA or kDLCUDAManaged, so
as_tensor_map() failed with "Device type must be kDLCUDA or
kDLCUDAManaged" on managed buffers.
Buffer.is_device_accessible / is_host_accessible already delegate to
the memory resource when one is attached. Apply the same pattern to
is_managed, and expose is_managed on the MemoryResource base
(defaulting to False) with ManagedMemoryResource overriding it to
True.
Also ignore .claude/settings.local.json in .gitignore.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a8805e5 commit 384c5c5
File tree
3 files changed
+13
-0
lines changed- cuda_core/cuda/core/_memory
3 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
| 394 | + | |
393 | 395 | | |
394 | 396 | | |
395 | 397 | | |
| |||
535 | 537 | | |
536 | 538 | | |
537 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
538 | 545 | | |
539 | 546 | | |
540 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
| |||
0 commit comments