Skip to main content

Module memory_info

Module memory_info 

Source
Expand description

Safe wrappers for GPU memory information and bulk memory operations.

This module provides convenient functions for querying device memory usage and performing device-to-device copies and memsets.

§Example

let (free, total) = memory_info::device_memory_info()?;
println!("GPU memory: {free} / {total} bytes free");

Functions§

device_memory_info
Returns the amount of free and total device memory in bytes.
memcpy_device_to_device
Copies bytes bytes from one device pointer to another.
memcpy_device_to_device_async
Asynchronously copies bytes bytes from one device pointer to another.
memset_d32
Sets count 32-bit elements starting at ptr to value.
memset_d32_async
Asynchronously sets count 32-bit elements starting at ptr to value.