device_mem_info
- arrayfire_wrapper.lib.device_mem_info() dict[str, dict[str, int]]
- Returns a map with the following fields:
- “alloc”: Contains the map of the following
“buffers” : Total number of buffers allocated by memory manager.
“bytes” : Total number of bytes allocated by memory manager.
- “lock”: Contains the map of the following
“buffers” : Total number of buffers currently in scope.
“bytes” : Total number of bytes currently in scope.
Note
ArrayFire does not free memory when array goes out of scope. The memory is marked for reuse. - The difference between alloc buffers and lock buffers equals the number of free buffers. - The difference between alloc bytes and lock bytes equals the number of free bytes.
source: https://arrayfire.org/docs/group__device__func__mem.htm#gae633760aed4638f8a5ea333e0774ac84