You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cuda.core: VirtualMemoryResourceOptions accepts values the driver rejects, and modify_allocation mishandles edge inputs #2910
Validation gaps found while analyzing #2882, each a small change: (1) addr_align larger than the granularity makes the adjacent-reservation probe fail with a misaligned hint, which is treated as fatal instead of falling back to the slow path; (2) new_size < buf.size is silently treated as an access-only update; (3) allocation_type=MANAGED is exposed but current drivers reject it in cuMemCreate; (4) modify_allocation guards a user-reachable condition with assert; (5) allocate(0) reaches the driver and fails while sibling resources return an empty Buffer; (6) the default handle_type=POSIX_FD fails on native Windows WDDM devices and on location_type="host"; (7) for host locations device_id is validated and ignored, HOST_NUMA_CURRENT can never allocate, and a host resource with peers reports is_device_accessible=False. Related: #2694.
I'd like to pick up items (4) and (5) from this list: raise a proper exception instead of the assert in modify_allocation, and have allocate(0) return an empty Buffer like the sibling resources. Happy to keep those to one small PR, if that split works for you. Could I be assigned?
Thanks for the offer, @bishal0922. #2917 has since merged and took care of items 1, 2, 4 and 5 and the host half of item 6, so the assert and allocate(0) are already handled.
Status after #2917: items 1, 2, 4 and 5 and the host half of item 6 are fixed. Still open:
(3) allocation_type="managed" is still exposed on CUDA 13 builds, and current drivers reject it in cuMemCreate.
(6) The default handle_type="posix_fd" still fails on native Windows WDDM devices.
(7) Host locations: device_id is validated and then ignored, "host_numa_current" can never allocate, and a host resource with peers reports is_device_accessible=False.
Item 7 overlaps #2694. I plan to fix the two together.
To be clear about scope: #3149 by @somtri covers the host_numa and host_numa_current half of item 7. The other item-7 gaps (the ignored device_id for host resources, and peers on a host resource) stay here for a follow-up after #3149 lands.
Activity
bishal0922 commentedon Sep 30, 2026
I'd like to pick up items (4) and (5) from this list: raise a proper exception instead of the
assertinmodify_allocation, and haveallocate(0)return an emptyBufferlike the sibling resources. Happy to keep those to one small PR, if that split works for you. Could I be assigned?fix(cuda.core): move VirtualMemoryResource onto the _rt handle layer (#…
Andy-Jost commentedon Oct 2, 2026
Thanks for the offer, @bishal0922. #2917 has since merged and took care of items 1, 2, 4 and 5 and the host half of item 6, so the
assertandallocate(0)are already handled.Andy-Jost commentedon Oct 22, 2026
Status after #2917: items 1, 2, 4 and 5 and the host half of item 6 are fixed. Still open:
allocation_type="managed"is still exposed on CUDA 13 builds, and current drivers reject it incuMemCreate.handle_type="posix_fd"still fails on native Windows WDDM devices.device_idis validated and then ignored,"host_numa_current"can never allocate, and a host resource withpeersreportsis_device_accessible=False.Item 7 overlaps #2694. I plan to fix the two together.
Andy-Jost commentedon Oct 23, 2026
To be clear about scope: #3149 by @somtri covers the
host_numaandhost_numa_currenthalf of item 7. The other item-7 gaps (the ignoreddevice_idfor host resources, andpeerson a host resource) stay here for a follow-up after #3149 lands.