print_mem_info
- arrayfire_wrapper.lib.print_mem_info(msg: str = 'Memory Info', device_id: None | int = None, /) None
Prints the memory used for the specified device.
Parameters
- title: optional. Default: “Memory Info”
Title to display before printing the memory info.
- device_id: optional. Default: None
Specifies the device for which the memory info should be displayed.
If None, uses the current device.
Examples
>>> a = af.randu(5,5) >>> af.print_mem_info() Memory Info --------------------------------------------------------- | POINTER | SIZE | AF LOCK | USER LOCK | --------------------------------------------------------- | 0x706400000 | 1 KB | Yes | No | --------------------------------------------------------- >>> b = af.randu(5,5) >>> af.print_mem_info() Memory Info --------------------------------------------------------- | POINTER | SIZE | AF LOCK | USER LOCK | --------------------------------------------------------- | 0x706400400 | 1 KB | Yes | No | | 0x706400000 | 1 KB | Yes | No | --------------------------------------------------------- >>> a = af.randu(1000,1000) >>> af.print_mem_info() Memory Info --------------------------------------------------------- | POINTER | SIZE | AF LOCK | USER LOCK | --------------------------------------------------------- | 0x706500000 | 3.815 MB | Yes | No | | 0x706400400 | 1 KB | Yes | No | | 0x706400000 | 1 KB | No | No | ---------------------------------------------------------
source: https://arrayfire.org/docs/group__device__func__mem.htm#ga7c928031579de47fe21594fd745e9188