Skip to content
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 support for nvidia GPUs #676

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

shurizzle
Copy link
Contributor

@shurizzle shurizzle commented Feb 14, 2022

Description

I added the support for nvidia's GPUs temperature using the crate nvml-wrapper that load the nvml library only if it exists, so you can use it optionally even if the nvidia flag is setted. Interestingly on my test on my Windows machine no sensors are found except the nvidia's one. I tested it on Windows 10 with GeForce 1080, on the same machine with ArchLinux and on a Mid 2014 MacBook Pro 14" Retina. I let the tests run on Github Actions' CI and seems that nothing brokes.

Here some screenshots:

  • Windows 10:
    image

  • ArchLinux:
    image

  • MacOS:
    image

@ClementTsang ClementTsang self-assigned this Feb 14, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #676 (c0feff3) into master (fbd9512) will increase coverage by 0.62%.
The diff coverage is 37.79%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #676      +/-   ##
=========================================
+ Coverage    7.21%   7.84%   +0.62%     
=========================================
  Files          52      53       +1     
  Lines        8238    8278      +40     
=========================================
+ Hits          594     649      +55     
+ Misses       7644    7629      -15     
Impacted Files Coverage Δ
src/app/data_harvester.rs 0.00% <ø> (ø)
src/app/data_harvester/temperature/heim.rs 0.00% <0.00%> (ø)
src/app/data_harvester/temperature/mod.rs 0.00% <0.00%> (ø)
src/app/data_harvester/temperature/nvidia.rs 0.00% <0.00%> (ø)
src/canvas.rs 0.00% <0.00%> (ø)
src/canvas/drawing_utils.rs 57.29% <92.30%> (+57.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ef7f5d...c0feff3. Read the comment docs.

@ClementTsang
Copy link
Owner

Sorry for taking so long to getting around to review this.

Tested on my Windows VM, worked fine there too with grabbing my passed-through 1050 Ti. Code also looks good to me. Thanks for this!

@all-contributors add @shurizzle for code

@allcontributors
Copy link
Contributor

@ClementTsang

I've put up a pull request to add @shurizzle! 🎉

@ClementTsang ClementTsang merged commit 3959797 into ClementTsang:master Feb 22, 2022
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.

3 participants