setup.ps1: keep the ROCm CPU-fallback force line the pr5940 test guards
5c93ffd4 folded the pin-change force-reinstall into the ROCm CPU-fallback
condition on one line, so the exact literal that test_pr5940_followups.py checks
(if ($ROCmCpuFallback) { $cpuForce = @("--force-reinstall") }) no longer appeared
and the test failed. Split the two conditions into separate if lines: the ROCm
fallback line is restored verbatim and the pin-change force is its own line. Both
still set $cpuForce to the array, so @splat passes one arg.
This commit is contained in:
parent
5c93ffd450
commit
0d48584e8f
1 changed files with 2 additions and 1 deletions
|
|
@ -3205,9 +3205,10 @@ if (-not $ROCmIndexUrl -and ($CuTag -eq "cpu" -or $ROCmCpuFallback)) {
|
|||
# Build the array directly: an if-expression collapses @("x") to a scalar string,
|
||||
# which @splat would then enumerate char-by-char into broken single-letter args.
|
||||
$cpuForce = @()
|
||||
if ($ROCmCpuFallback) { $cpuForce = @("--force-reinstall") }
|
||||
# --force-reinstall also on a pin change: a stale +cu / +rocm wheel still
|
||||
# satisfies the CPU torch>= range, so uv would keep it and only swap companions.
|
||||
if ($ROCmCpuFallback -or $script:PinChangedForceReinstall) { $cpuForce = @("--force-reinstall") }
|
||||
if ($script:PinChangedForceReinstall) { $cpuForce = @("--force-reinstall") }
|
||||
if ($script:UnslothVerbose) {
|
||||
Fast-Install torch torchvision torchaudio @cpuForce --index-url $TorchInstallIndexUrl
|
||||
$torchInstallExit = $LASTEXITCODE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue