Skip to content

Commit

Permalink
Improved GPU max power reading #3124
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Sep 18, 2024
1 parent 07f1edb commit 28f8cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Gpu/NVidia/NvidiaSmi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static int GetDefaultMaxGPUPower()
public static int GetMaxGPUPower()
{
string output = RunNvidiaSmiCommand("--query-gpu=power.max_limit --format csv,noheader,nounits");
output = output.Trim().Trim('\n', '\r');
output = output.Trim().Trim('\n', '\r').Replace(".00","").Replace(",00", "");

if (float.TryParse(output, out float floatValue))
{
Expand Down

0 comments on commit 28f8cc9

Please sign in to comment.