Expand description
Process-global MLX allocator controls and observations.
The state exposed here affects every thread and every evaluation in the process. These functions do not synchronize a sequence of reads and writes for callers.
Functions§
- active_
memory - Return the number of bytes in active use by MLX.
- cache_
memory - Return the number of bytes held in MLX’s allocator cache.
- clear_
cache - Clear cached allocator buffers.
- memory_
limit - Return the process-global memory limit in bytes.
- peak_
memory - Return the peak number of bytes used by MLX.
- reset_
peak_ memory - Reset the process-global peak-memory counter for all threads and evaluations.
- set_
cache_ limit - Set the process-global allocator-cache limit in bytes and return its previous value.
- set_
memory_ limit - Set the process-global memory limit in bytes and return its previous value.
- set_
wired_ limit - Set the process-global wired-memory limit in bytes and return its previous value.