From 547f61d3259a3db43820f440112c4fc79671d5dd Mon Sep 17 00:00:00 2001 From: uhliksk <37454226+uhliksk@users.noreply.github.com> Date: Wed, 16 Mar 2022 19:15:08 +0100 Subject: [PATCH] Update rtx30xx.ps1 --- rtx30xx.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rtx30xx.ps1 b/rtx30xx.ps1 index 17c028e..b83cde6 100644 --- a/rtx30xx.ps1 +++ b/rtx30xx.ps1 @@ -1,6 +1,4 @@ $gpu=0; -$wget="wget.exe"; $apifaw="http://localhost:18000/api?command={%22id%22:1,%22method%22:%22device.get%22,%22params%22:[%22$gpu%22]}"; -$auth=""; $lfr=210; $mfr=480; $hfr=1230; -$cycle=7.997; $boost=4; $lasttime=[Math]::Round((Get-Date).ToFileTimeUTC()/10000); $looptime=$lasttime; $nextfaw=0; $lastfaw=0; $skip=0; nvidia-smi.exe -i $gpu -lmc 10000; while ($true) { $now=[Math]::Round((Get-Date).ToFileTimeUTC()/10000); if (($faw -eq 56) -Or ((($now-$lasttime)/1000) -ge $nextfaw)) { $faw=(((&$wget --header "Authorization: $auth" "$apifaw" -nv -q -O-)+",").split(",")[93]+":").split(":")[1]; $nextfaw+=2.3; }; if ($faw -ne $lastfaw) { (get-date -f "dd.MM.yyyy HH:mm:ss")+" "+$lastfaw+" -> "+$faw+" @ "+($now-$lasttime)/1000+" ("+($now-$looptime)/1000+")"; if ($lastfaw -eq 56) { $lasttime=$now; $nextfaw=0; $skip=0; } else { $lasttime+=$cycle*1000; }; $lastfaw=$faw; if ($faw -eq 20) { nvidia-smi.exe -i $gpu -lgc $hfr | Out-Null; }; if ($faw -eq 56) { $looptime=$now; nvidia-smi.exe -i $gpu -lgc $lfr | Out-Null; $boost=[Math]::Round($boost-0.005,3); }; }; if (($faw -eq 20) -And ((($now-$lasttime)/1000) -ge ($boost+$skip))) { $skip=$cycle; nvidia-smi.exe -i $gpu -lgc $mfr | Out-Null; ("Boost: "+$boost+" @ "+($now-$lasttime)/1000)+" ("+($now-$looptime)/1000+")"; sleep -m 100; }; if (($faw -eq 20) -And ((($now-$lasttime)/1000) -ge $cycle)) { $lastfaw=21; $nextfaw=0; $skip=0; $boost=4; }; sleep -m 10; } +$cycle=7.997; $boost=4; $lasttime=[Math]::Round((Get-Date).ToFileTimeUTC()/10000); $looptime=$lasttime; $nextfaw=0; $lastfaw=0; $skip=0; nvidia-smi.exe -i $gpu -lmc 10000; $ProgressPreference='SilentlyContinue'; while ($true) { $now=[Math]::Round((Get-Date).ToFileTimeUTC()/10000); if (($faw -eq 56) -Or ((($now-$lasttime)/1000) -ge $nextfaw)) { $faw=((wget "$apifaw").Content | ConvertFrom-Json).device.gpu_memory_timings.timings.FAW; $nextfaw+=2.3; }; if ($faw -ne $lastfaw) { (get-date -f "dd.MM.yyyy HH:mm:ss")+" "+$lastfaw+" -> "+$faw+" @ "+($now-$lasttime)/1000+" ("+($now-$looptime)/1000+")"; if ($lastfaw -eq 56) { $lasttime=$now; $nextfaw=0; $skip=0; } else { $lasttime+=$cycle*1000; }; $lastfaw=$faw; if ($faw -eq 20) { nvidia-smi.exe -i $gpu -lgc $hfr | Out-Null; }; if ($faw -eq 56) { $looptime=$now; nvidia-smi.exe -i $gpu -lgc $lfr | Out-Null; $boost=[Math]::Round($boost-0.005,3); }; }; if (($faw -eq 20) -And ((($now-$lasttime)/1000) -ge ($boost+$skip))) { $skip=$cycle; nvidia-smi.exe -i $gpu -lgc $mfr | Out-Null; ("Boost: "+$boost+" @ "+($now-$lasttime)/1000)+" ("+($now-$looptime)/1000+")"; sleep -m 100; }; if (($faw -eq 20) -And ((($now-$lasttime)/1000) -ge $cycle)) { $lastfaw=21; $nextfaw=0; $skip=0; $boost=4; }; sleep -m 10; }