-
Notifications
You must be signed in to change notification settings - Fork 116
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
[L0] Fix DeviceInfo global mem free to report unsupported given MemCount==0 #1486
Conversation
This change assumes FreeMemory <= 0 means the FreeMemory api doesn't work, so I have a concern here: Wouldn't there be cases for which the call works and returns <=0 because the device is really out of memory ? In that case we really don't want to report global_memory. |
b7cf9ae
to
c913298
Compare
Thank you for the comment @ph0b , I realized I should be checking the MemCount. If there are no memory modules reported by the API, then free memory is invalid. If there are MemCount modules, then free memory is the correct value. |
If the API "fails", then the call will report a UR api failure. In the case of MemCount==0, it means that the API did not find any memory modules, which is not an error, but it does mean that the free memory is not set. |
Hi @nrspruit, can you please explain more about a reason behind this changes? |
c913298
to
096be8b
Compare
…unt==0 - If there are no memory modules from zesDeviceEnumMemoryModules, then we cannot query the free memory from level zero and we do not support reporting free memory thru this api on this platform/os. Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
096be8b
to
ec773e6
Compare
Based on offline discussion, this has been changed to return unsupported if the number of memory modules returned is 0. That way you either get the free memory or unsupported, if the L0 driver cannot query the free memory in this device. |
…emCount==0 pre-commit PR for oneapi-src/unified-runtime#1486 Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
…emCount==0 (#13209) pre-commit PR for oneapi-src/unified-runtime#1486 Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
[L0] Fix DeviceInfo global mem free to report unsupported given MemCount==0
…emCount==0 (intel#13209) pre-commit PR for oneapi-src/unified-runtime#1486 Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
No description provided.