-
Notifications
You must be signed in to change notification settings - Fork 248
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
Add gpu proc info #1276
Add gpu proc info #1276
Conversation
Consolidated gpu calls into `data_harvester`. Changed config flag from `enable_gpu_memory` to `enable_gpu`. Added GPU utilization to the cpu widget. Added GPU process memory usage and utilization percentage to the proc widget. Added key binds for gpu process toggling. Added GPU power usage to the battery widget. Added bounds check to battery widget header. Show battery widget header when `gpu_enable`. Added feature flag `legacy-functions` to `nvml-wrapper`. updated config file(s). updated help text. updated docs.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1276 +/- ##
==========================================
- Coverage 31.82% 31.57% -0.26%
==========================================
Files 98 97 -1
Lines 16674 16943 +269
==========================================
+ Hits 5307 5349 +42
- Misses 11367 11594 +227
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for taking so long - been busy with some other stuff.
Generally, I like what is done and do want to merge this; adding GPU support has been something I've wanted for a while. However, I feel like there's a few areas where I would rather GPU information be displayed (at least by default) as a separate widget, like usage and power consumption.
Feel free to let me know if there's any areas you would like to see changes in the code to make that easier.
Thank you for your comments and feedback thus far. Please take your time and apologizes for the large PR.
With removal of the power/util the only added information in this PR is for gpu procs. I have updated the description with the changes.
I have not looked into adding widgets yet. My initial concern is screen space/layout in advanced mode (I mostly use basic mode). |
Remove GPU util from cpu widget Remove GPU power from battery widget Use reference for gpu widgets_to_harvest Extract match arm to function for feature gate
Sorry for the delay with reviewing this btw, been really with work/life for a bit - will get to looking at this in a bit. |
Any Progress on this? |
Sorry, just got back from a vacation 😅 , will look at this sometime this week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me, apologies for taking so long to review! Just a few comments/questions/nitpicks but bulk of it seems fine.
adjust doc wordings remove extra references remove extra widget harvest checks init proc gpu values use convert_temp_unit for gpu temp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpicks, but otherwise looks good to me. Happy to merge if you don't have anything else to add in.
ProcColumn::GpuMem => "GMEM", | ||
#[cfg(feature = "gpu")] | ||
ProcColumn::GpuMemPercent => "GMEM%", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit for consistency:
ProcColumn::GpuMem => "GMEM", | |
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMemPercent => "GMEM%", | |
ProcColumn::GpuMem => "GMem", | |
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMemPercent => "GMem%", |
#[cfg(feature = "gpu")] | ||
ProcColumn::GpuMem => "GMEM", | ||
#[cfg(feature = "gpu")] | ||
ProcColumn::GpuMemPercent => "GMEM%", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here:
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMem => "GMEM", | |
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMemPercent => "GMEM%", | |
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMem => "GMem", | |
#[cfg(feature = "gpu")] | |
ProcColumn::GpuMemPercent => "GMem%", |
@@ -433,7 +433,7 @@ pub fn build_app( | |||
use_cpu: used_widget_set.get(&Cpu).is_some() || used_widget_set.get(&BasicCpu).is_some(), | |||
use_mem, | |||
use_cache: use_mem && get_enable_cache_memory(matches, config), | |||
use_gpu: use_mem && get_enable_gpu_memory(matches, config), | |||
use_gpu: use_mem && get_enable_gpu(matches, config), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably just do:
use_gpu: use_mem && get_enable_gpu(matches, config), | |
use_gpu: get_enable_gpu(matches, config), |
I do not have anything to add unless you want me to address the comments. I can assist in testing after the merge for the changes too. Thanks again for the responses. |
They're small things that I can address quickly after merging this, so no worries there. And testing would be appreciated! I don't have any computers that use NVIDIA GPUs at the moment so it's a bit hard for me to test right now unless I mock it or until I look into supporting other GPUs. |
It was determined during code review (commit) to remove the utilization and power consumption from the default displays per the following comment:
I didn't update the screenshots after removal. Sorry for the confusion. |
and that separate widget is implemented or not yet? |
btw i also find it a bit confusing showing VRAM and RAM memory in the same widget, but split GPU and CPU processors - in that case i guess VRAM also should be moved to the gpu widget? |
It is not implemented yet. Anyone is free to implement it tho.
Most likely imo |
Description
Consolidated gpu calls into
data_harvester
.Changed config flag from
enable_gpu_memory
toenable_gpu
.Added GPU utilization to the cpu widget.Added GPU process memory usage and utilization percentage to the proc widget. (enable by uncommenting the process column headers in the config file; not shown by default)
Added key binds for gpu process toggling
C
M
(better defaults?)Added GPU power usage to the battery widget. (linux only as windows returned 0 for me.)Added bounds check to battery widget header (selected out of bounds if clicking across the top of battery widget from left->right; regardless of tabs).
Show battery widget header (for gpu name) whenenable_gpu
. (does gpu power usage belong in the battery widget?)Added battery config/cli precedence
Added feature flag
legacy-functions
tonvml-wrapper
updated config file(s)
updated help text
updated docs
Screenshots:
linux basic:
linux:
freebsd:
windows basic:
Issues
Maybe closes: #566 and #1291(disable temp with gpu flag)
and #298 unless more information is desired (like fan speed for 272). Should there be a list of things still needed? (amd/intel gpus?)NVML seems inconsistent at times. Linux/Windows results differed after driver updates. (maybe keep
legacy-functions
feature until issue 48 resolved in nvml-wrapper...)Testing
Ran on windows(w/gpu), linux (w/gpu) and freebsd (no gpu)
Checklist
cargo fmt
)README.md
, help menu, doc pages, etc.)I did NOT test on macOS.
If any of the Issues should be addressed or a different approach used please let me know.
Feel free to close this PR if it is unwanted.