get total, used and free memory (in MBs) for each available gpu
(self)
| 63 | return th.device('cpu') |
| 64 | |
| 65 | def gpu_mem_get_all(self): |
| 66 | "get total, used and free memory (in MBs) for each available gpu" |
| 67 | return list(map(self.gpu_mem_get, range(self.pynvml.nvmlDeviceGetCount()))) |
| 68 | |
| 69 | def gpu_mem_get(self, _id=None): |
| 70 | """get total, used and free memory (in MBs) for gpu `id`. if `id` is not passed, |