megengine.get_allocated_memory

get_allocated_memory(device=None)[源代码]

Returns the current memory occupied by tensors on the computing device in bytes.

Due to the asynchronous execution of MegEngine, please call megengine._full_sync before calling this function in order to get accurate value.