Commit 0650f4b
Fix managed memory incorrectly classified as kDLCUDAHost in DLPack device mapping
_smv_get_dl_device() treated all buffers that are both device- and
host-accessible as kDLCUDAHost. Managed (unified) memory is also both-
accessible, so it was misclassified. CCCL's make_tma_descriptor then
rejected the descriptor with "Device type must be kDLCUDA or
kDLCUDAManaged".
Preserve the is_managed flag already queried via
CU_POINTER_ATTRIBUTE_IS_MANAGED in _query_memory_attrs(), expose it on
Buffer, and use it in _smv_get_dl_device() to return kDLCUDAManaged for
managed memory.
Fixes: https://nvbugspro.nvidia.com/bug/6044342
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c2f79a1 commit 0650f4b
File tree
3 files changed
+14
-2
lines changed- cuda_core/cuda/core
- _memory
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
| |||
459 | 465 | | |
460 | 466 | | |
461 | 467 | | |
| 468 | + | |
462 | 469 | | |
463 | 470 | | |
464 | 471 | | |
| |||
467 | 474 | | |
468 | 475 | | |
469 | 476 | | |
| 477 | + | |
470 | 478 | | |
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
| 482 | + | |
474 | 483 | | |
475 | 484 | | |
476 | 485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
611 | | - | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
612 | 614 | | |
613 | 615 | | |
614 | 616 | | |
| |||
0 commit comments