Skip to content

Conversation

NUABO
Copy link
Contributor

@NUABO NUABO commented Jun 4, 2025

nvmlDeviceGetMemoryInfo v2 free memory is not correctly

Copy link

hami-robott bot commented Jun 4, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: NUABO

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

hami-robott bot commented Jun 4, 2025

Welcome @NUABO! It looks like this is your first PR to Project-HAMi/HAMi-core 🎉

@hami-robott hami-robott bot added the size/XS label Jun 4, 2025
@NUABO NUABO force-pushed the fix-nvmlDeviceGetMemoryInfo branch from 4ec1e90 to 4f61793 Compare June 4, 2025 08:51
@NUABO
Copy link
Contributor Author

NUABO commented Jun 4, 2025

@archlitchi Please take a look

@archlitchi
Copy link
Member

do you have a related-issue describing what went wrong before your fixing? a bug screenshot is most appreciated

@NUABO
Copy link
Contributor Author

NUABO commented Jun 4, 2025

do you have a related-issue describing what went wrong before your fixing? a bug screenshot is most appreciated

@archlitchi sorry for not having relevant screenshots. I looked at the code and found that ((nvmlMemory_v2_t *)memory)->used was assigned twice in the past process, and there was no free assignment. I think there is something wrong with this code.
case 2: ((nvmlMemory_v2_t *)memory)->used = usage; ((nvmlMemory_v2_t *)memory)->total = limit; ((nvmlMemory_v2_t *)memory)->used = usage; return NVML_SUCCESS;

@NUABO NUABO force-pushed the fix-nvmlDeviceGetMemoryInfo branch from 4f61793 to 64e9ac4 Compare June 12, 2025 01:34
@NUABO NUABO changed the title fix the display of memory in nvmlDeviceGetMemoryInfo v2 fix the free memory in nvmlDeviceGetMemoryInfo v2 Jun 12, 2025
@archlitchi
Copy link
Member

/lgtm

@archlitchi archlitchi merged commit dabaeba into Project-HAMi:main Jun 19, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants