oneapi-src / oneapi-src/level-zero
How to detect iGPU free memory
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 335
- Forks
- 140
- Avg merge
- 12h 32m
- Merged PRs (30d)
- 5
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported entry points, zesDeviceEnumMemoryModules and zesMemoryGetState, and compare their behavior on an iGPU with the SYCL free_memory example in sycl_ext_intel_device_info.md. Reproduce the zero pCount and free-memory results with ZES_ENABLE_SYSMAN=1, then determine whether the existing APIs support integrated graphics memory before documenting or addressing the observed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100