mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #398] [MERGED] Monitor: the GPU map finds an engine run through a launcher (its memory was drawn as other programs) #512
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#512
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/398
Author: @somnergy
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @mw00
Base:
main← Head:pr/gpu-map-container-pids📝 Commits (1)
d37e50bMonitor: the GPU map finds an engine run through a launcher (its memory was drawn as other programs)📊 Changes
3 files changed (+100 additions, -6 deletions)
View changed files
📝
serve/gpu_map.py(+19 -4)📝
serve/server.py(+19 -2)📝
serve/test_dashboard.py(+62 -0)📄 Description
Problem
When the engine's command is a launcher that does not
execit (here a wrapper script that runsnsys launch), the Monitor's GPU map shows about 0.5-0.6 GB of "other programs" on every card, even though NVML lists only one process, the engine's.Cause
gpu_map.viewlooks for the engine's NVML entry under the pid of the process the server started. With a launcher in between, that pid belongs to the launcher, and NVML lists the process the launcher started instead. Soownis None, and the map falls back to the start's measurement. Then everything the card holds beyond that measurement is drawn as other programs: what the engine allocated after it, and the driver's reserve (NVML's used memory counts it, CUDA's total does not).Fix
server.nvml_pids: when NVML lists processes but not the started one, it also looks for the processes the started one started in turn, at any depth (psutil). Without psutil it returns the pid alone.gpu_map.viewaccepts a pid or a set of pids for the engine and for the vision encoder. Their NVML entries add up.How it was verified
Hardware: 2x NVIDIA RTX PRO 5000 Blackwell 72 GB, driver 615.71.09, Docker without
--pid=host. Maya-L split over both cards.nsys launchfrom a wrapper script, main showed 0.5 GB of other programs per card.Free memory is the same in both. With the engine started directly, main and the patch both give 0.00 / 8.39 and 0.00 / 7.31.
python -m unittest discover -s serve -p "test_*.py" -t .: 346 tests pass. The new tests cover:nvml_pidson a real launcher and the grandchild it starts.Not in this PR:
wait_gpu_releasealso waits on the started pid only, so with a launcher it does not wait for the engine's memory to be freed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.