Skip to content

Don't let the memory text overwrite the MEM label - #534

Open
cjolivier01 wants to merge 1 commit into
Syllo:masterfrom
cjolivier01:upstream-fix/mem-meter-overflow
Open

cjolivier01 wants to merge 1 commit into
Syllo:masterfrom
cjolivier01:upstream-fix/mem-meter-overflow

Conversation

@cjolivier01

@cjolivier01 cjolivier01 commented Oct 17, 2026 •

Copy link
Copy Markdown

draw_percentage_meter() right-aligns the text inside the brackets by moving left from the closing bracket. When the text is wider than the meter it doesn't get clipped — it gets drawn over the MEM[ label.

before and after

Needs a three-digit memory figure, so a 141 GB H200 / 192 GB B200 / MI300X, plus a device panel narrow enough that MEM ends up under 24 columns — a short GPU name does that, since the panel is sized from the name.

Reproduced above by forcing total_memory to 141 GB and the panel width to 69 columns on master.

The fix falls back to 123.5/141.0Gi and then to whole units when the full form won't fit. Nothing changes for GPUs where it already fits.

🤖 Generated with Claude Code

@cjolivier01
cjolivier01 force-pushed the upstream-fix/mem-meter-overflow branch from fc849a9 to 64a68c5 Compare October 17, 2026 17:10
@cjolivier01
cjolivier01 marked this pull request as ready for review October 17, 2026 17:13
draw_percentage_meter() right-aligns the text by moving left from the
closing bracket, so a string wider than the meter is drawn over the
"MEM[" label rather than being clipped:

  GPU[              0%] M123.456Gi/141.000Gi] ENC[     0%]

It needs a three-digit memory figure (H200, B200, MI300X) and a device
panel narrow enough that MEM gets under 24 columns, which a short GPU
name does. Fall back to a shorter form when the full one won't fit.
@cjolivier01
cjolivier01 force-pushed the upstream-fix/mem-meter-overflow branch from 64a68c5 to fbe13a3 Compare October 17, 2026 17:16
@cjolivier01
cjolivier01 marked this pull request as draft October 17, 2026 17:18
@cjolivier01
cjolivier01 marked this pull request as ready for review October 17, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant