Skip to main content

Module memory_info

Module memory_info 

Source
Expand description

GPU memory usage queries and unified memory hints.

This module provides:

§Example

let info = memory_info()?;
println!("GPU memory: {} MB free / {} MB total",
    info.free / (1024 * 1024),
    info.total / (1024 * 1024),
);

Structs§

MemoryInfo
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.