File size: 512 Bytes
c2b1b26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
param(
  [string]$Config = "configs/train_2gpu_4090d.json",
  [int]$Start = 8,
  [int]$Stop = 32,
  [int]$Step = 2
)

$ErrorActionPreference = "Continue"
for ($batch = $Start; $batch -le $Stop; $batch += $Step) {
  Write-Host "Trying per-GPU batch=$batch"
  powershell -ExecutionPolicy Bypass -File scripts/train_2gpu.ps1 -Config $Config -BatchSize $batch -Epochs 1
  if ($LASTEXITCODE -ne 0) {
    Write-Host "Failed at per-GPU batch=$batch. Use the previous successful value."
    exit 0
  }
}