Skip to content

cuda.core: VirtualMemoryResourceOptions accepts values the driver rejects, and modify_allocation mishandles edge inputs #2910

Open

Description

@Andy-Jost

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.

Activity

  1. added
    bugSomething isn't working
    cuda.coreEverything related to the cuda.core module
    on Sep 17, 2026
  2. bishal0922 commented on Sep 30, 2026

    @bishal0922

    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?

  3. Andy-Jost commented on Oct 2, 2026

    @Andy-Jost
    ContributorAuthor

    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.

  4. added this to the cuda.core 1.3.0 milestone on Oct 8, 2026
  5. added theissue type on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcuda.coreEverything related to the cuda.core module

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions