pub enum NumaStrategy {
DISABLED,
DISTRIBUTE,
ISOLATE,
NUMACTL,
MIRROR,
COUNT,
}Expand description
A rusty wrapper around numa_strategy.
§Description
Represents different NUMA (Non-Uniform Memory Access) strategies for memory management in multi-core or multi-processor systems.
§See more
https://github.com/ggerganov/llama.cpp/blob/master/ggml/include/ggml-cpu.h#L25-L32
Variants§
DISABLED
The NUMA strategy is disabled. No NUMA-aware optimizations are applied. Memory allocation will not consider NUMA node locality.
DISTRIBUTE
Distribute memory across NUMA nodes. This strategy aims to balance memory usage across all available NUMA nodes, potentially improving load balancing and preventing memory hotspots on a single node. It may use round-robin or another method to distribute allocations.
ISOLATE
Isolate memory to specific NUMA nodes. Memory allocations will be restricted to specific NUMA nodes, potentially reducing contention and improving locality for processes or threads bound to a particular node.
NUMACTL
Use numactl to manage memory and processor affinities. This strategy utilizes
the numactl command or library to bind processes or memory allocations to specific
NUMA nodes or CPUs, providing fine-grained control over memory placement.
MIRROR
Mirror memory across NUMA nodes. This strategy creates duplicate memory copies on multiple NUMA nodes, which can help with fault tolerance and redundancy, ensuring that each NUMA node has access to a copy of the memory.
COUNT
A placeholder representing the total number of strategies available. Typically used for iteration or determining the number of strategies in the enum.
Trait Implementations§
Source§impl Clone for NumaStrategy
impl Clone for NumaStrategy
Source§fn clone(&self) -> NumaStrategy
fn clone(&self) -> NumaStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more