intel / intel/xpumanager

Get free memory through ze_device_usablemem_size_ext_properties_t

Open
#139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
194
Forks
34
PR merge metrics
No merged PRs in 30d

Description

spec: https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/api.html#structze__device__usablemem__size__ext__properties__t
driver supported from: https://github.com/intel/compute-runtime/releases/tag/26.18.38308.1

sample code:

```
size_t getUsableMemory(ze_device_handle_t& device) {
ze_device_properties_t deviceProperties{};
ze_device_usablemem_size_ext_properties_t usableMemProps{};

usableMemProps.stype = ZE_STRUCTURE_TYPE_DEVICE_USABLEMEM_SIZE_EXT_PROPERTIES;
deviceProperties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES;
deviceProperties.pNext = &usableMemProps;

zeDeviceGetProperties(device, &deviceProperties);
return usableMemProps.currUsableMemSize;
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the Level Zero specification for ze_device_usablemem_size_ext_properties_t and the existing device-property collection around zeDeviceGetProperties. Verify the extension against the stated driver version, then expose currUsableMemSize wherever xpumanager reports device memory; done means free usable memory is retrieved and reported correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
observability-sre
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.