Expand description
GPU memory usage queries and unified memory hints.
This module provides:
MemoryInfoandmemory_infofor querying free/total GPU memory.MemAdviceandmem_advisefor providing memory usage hints to the CUDA unified memory subsystem.mem_prefetchfor prefetching unified memory to a specific device.
§Example
let info = memory_info()?;
println!("GPU memory: {} MB free / {} MB total",
info.free / (1024 * 1024),
info.total / (1024 * 1024),
);Structs§
- Memory
Info - GPU memory usage information.
Enums§
- MemAdvice
- Memory advice hints for unified (managed) memory.
Functions§
- mem_
advise - Provides a memory usage hint for a unified memory region.
- mem_
prefetch - Prefetches unified memory to the specified device.
- memory_
info - Queries free and total device memory for the current CUDA context.