Skip to content

cnmem cannot allocate the full memory for a device #9

@revans2

Description

@revans2

This is really minor but as I was playing around with Rapids and RMM, which wraps cnmem I noticed that

cnmem/src/cnmem.cpp

Lines 1103 to 1104 in 37896cc

CNMEM_CHECK_TRUE(
size > 0 && size < props.totalGlobalMem, CNMEM_STATUS_INVALID_ARGUMENT);

is checking that the memory allocated is < the total memory on the device and not <=. Not that 1 byte really matters all that much most of the time. We were playing around with unified memory and wanted to be able to over commit in the worst case so we allocated more than the device supported, and when I traced down the returned error I noticed this. If we do decide to support unified with over-commit we may come back with further issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions