intel-extension-for-pytorch
intel-extension-for-pytorch copied to clipboard
Add an API to get current global free memory of XPU
This PR fixes https://github.com/intel/intel-extension-for-pytorch/issues/522, using ZES_ENABLE_SYSMAN environment variable to make it work.
It also adds a torch.xpu.mem_get_info() method which behaves the same as torch.cuda.mem_get_info().
Sadly it only works under root. I have opened https://github.com/oneapi-src/level-zero/issues/133 but got no response yet.
Any ideas?
So by https://github.com/oneapi-src/level-zero/issues/133, this requires root user or CAP_PERFMON to work. I'm not sure if Intel is going to add a non-privileged API to get this info. Any updates?