28 lines
822 B
PowerShell
28 lines
822 B
PowerShell
# scripts/build-dev.ps1
|
|
# Development build of llama.cpp for Windows (Debug, CUDA RTX 3070).
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$root = Split-Path $PSScriptRoot -Parent
|
|
$vendor = Join-Path $root "vendor\llama.cpp"
|
|
$buildDir = Join-Path $vendor "build-dev"
|
|
|
|
if (-not (Test-Path (Join-Path $vendor "CMakeLists.txt"))) {
|
|
Write-Error "vendor/llama.cpp not initialised. Run: git submodule update --init --recursive"
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "[INFO] Configuring llama.cpp (dev, CUDA enabled)..."
|
|
cmake -S $vendor -B $buildDir `
|
|
-DCMAKE_BUILD_TYPE=Debug `
|
|
-DBUILD_SHARED_LIBS=ON `
|
|
-DGGML_CUDA=ON `
|
|
"-DCMAKE_CUDA_ARCHITECTURES=86" `
|
|
-DLLAMA_BUILD_TESTS=OFF `
|
|
-DLLAMA_BUILD_EXAMPLES=OFF
|
|
|
|
Write-Host "[INFO] Building..."
|
|
cmake --build $buildDir --parallel
|
|
|
|
Write-Host "[OK] Dev build complete: $buildDir"
|