studio: combine llama.cpp build targets in setup.ps1
Build llama-server and llama-quantize in a single cmake --build invocation on Windows, matching the same optimization done in setup.sh. This allows MSBuild to better parallelize the two targets. The Visual Studio generator is kept as-is (not switching to Ninja on Windows since VS generator is the standard approach and interacts with MSBuild).
This commit is contained in:
parent
f8dc7c9a5c
commit
e4a5da8d96
1 changed files with 4 additions and 14 deletions
|
|
@ -898,30 +898,20 @@ if (Test-Path $LlamaServerBin) {
|
|||
}
|
||||
}
|
||||
|
||||
# -- Step C: Build llama-server --
|
||||
# -- Step C: Build llama-server + llama-quantize --
|
||||
$NumCpu = [Environment]::ProcessorCount
|
||||
if ($NumCpu -lt 1) { $NumCpu = 4 }
|
||||
|
||||
if ($BuildOk) {
|
||||
Write-Host ""
|
||||
Write-Host "--- cmake build (llama-server) ---" -ForegroundColor Cyan
|
||||
Write-Host "--- cmake build (llama-server + llama-quantize) ---" -ForegroundColor Cyan
|
||||
Write-Host " Parallel jobs: $NumCpu" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
cmake --build $BuildDir --config Release --target llama-server -j $NumCpu
|
||||
cmake --build $BuildDir --config Release --target llama-server llama-quantize -j $NumCpu
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
$BuildOk = $false
|
||||
$FailedStep = "cmake build (llama-server)"
|
||||
}
|
||||
}
|
||||
|
||||
# -- Step D: Build llama-quantize (optional, best-effort) --
|
||||
if ($BuildOk) {
|
||||
Write-Host ""
|
||||
Write-Host "--- cmake build (llama-quantize) ---" -ForegroundColor Cyan
|
||||
cmake --build $BuildDir --config Release --target llama-quantize -j $NumCpu
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host " [WARN] llama-quantize build failed (GGUF export may be unavailable)" -ForegroundColor Yellow
|
||||
$FailedStep = "cmake build (llama-server + llama-quantize)"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue