oneapi-src / unified-memory-framework

A library for constructing allocators and memory pools. It also contains broadly useful abstractions and utilities for memory management. UMF allows users to manage multiple memory pools characterized by different attributes, allowing certain allocation types to be isolated from others and allocated using different hardware resources as required.
https://oneapi-src.github.io/unified-memory-framework/
Other
36 stars 28 forks source link

OS provider should support various binding modes #242

Closed bratpiorka closed 2 weeks ago

bratpiorka commented 8 months ago

The operating system provider should support different binding modes. All these combinations should be tested and documented (animations like in memkind blog?) so that users can easily choose between them. There should be information in the documentation if a particular mode is not supported by a particular operating system.

bratpiorka commented 8 months ago

@DamianDuy please look at this list - the multiple - NUMA tests should follow this

igchor commented 8 months ago

As far as I know, I think the only mode support on Windows would be UMF_NUMA_MODE_PREFERRED (see https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualallocexnuma).

Also, perhaps we should just introduce a generic UMF_RESULT_ERROR_OUT_OF_PROVIDER_MEMORY and use it instead of the native `UMF_OS_RESULT_ERROR_ALLOC_FAILED? I think it will be needed for all providers anyway.

lukaszstolarczuk commented 6 months ago

As Igor stated (here) we should test falling back to other nodes and failed allocations. Go to the link for more details.

lukaszstolarczuk commented 6 months ago

one other thing here is that older hwloc (e.g. on 2.4.1 with kernel 5.14.0) does not support PREFERRED_MANY mode (I've seen this mode is for sure in kernel from ver. 5.15). So we either enforce newer hwloc or we describe differences in our docs (preferred vs preferred_many).