Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect iGPU free memory #166

Open
zhewang1-intc opened this issue Jul 3, 2024 · 1 comment
Open

How to detect iGPU free memory #166

zhewang1-intc opened this issue Jul 3, 2024 · 1 comment
Labels
question Further information is requested

Comments

@zhewang1-intc
Copy link

Hi, I'd like to ask how to use level-zero/sycl to detect available memory of Intel iGPUs (e.g., Intel® Iris® Xe Graphics, PCI ID: 46A0, codename: Alder Lake-P).

I found relevant APIs in level-zero, such as zesDeviceEnumMemoryModules and zesMemoryGetState. Unfortunately, when I call zesDeviceEnumMemoryModules on a system with only iGPU, the return value of pCount is 0. Therefore, I cannot get the iGPU memory information through zesMemoryGetState.

i also found how to use sycl to detect free memory in this doc, here is the code

if (dev.has(aspect::ext_intel_free_memory)) {
  auto FreeMemory = dev.get_info<ext::intel::info::device::free_memory>();
}

I ran this func with set ZES_ENABLE_SYSMAN=1, but I got the free_mem size is 0.

note that these issues don't appear on Intel dGPUs.
Windows Task Manager can directly show the total and used memory of iGPU. How to implement this function? Are there any code examples?

@lisanna-dettwyler lisanna-dettwyler added the question Further information is requested label Jul 11, 2024
@avimanyu786
Copy link

avimanyu786 commented Aug 3, 2024

Apparently, this issue is also there on Intel ARC A770 dGPUs (though in this case, it's for used memory), although it works on Intel Data Center Max 1100 dGPUs.

References:

  1. Incorrect Free Memory Reporting for Intel Arc(TM) A770 Graphics intel/compute-runtime#750
  2. Inconsistent GPU Memory Usage Reporting Between dpctl and xpu-smi IntelPython/dpctl#1761

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants