Skip to content

Commit

Permalink
Create rtx30xx.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
uhliksk authored Feb 28, 2022
1 parent fee0415 commit 2c4d059
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtx30xx.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$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; }

0 comments on commit 2c4d059

Please sign in to comment.