From e717042454d431dfa2080f24924140e61caf3f15 Mon Sep 17 00:00:00 2001 From: danielhanchen Date: Mon, 6 Jul 2026 10:32:30 +0000 Subject: [PATCH] Restore Unsloth CUDA tuning flags in the GPU llama.cpp configure The CPU/GPU configure split dropped the GGML_CUDA tuning flags from the GPU branch. Restore GGML_CUDA_FA_ALL_QUANTS=ON, GGML_CUDA_F16=OFF, GGML_CUDA_GRAPHS=OFF, GGML_CUDA_FORCE_CUBLAS=OFF and GGML_CUDA_PEER_MAX_BATCH_SIZE=8192 inside the if ($HasNvidiaSmi -and $NvccPath) block so GPU builds match the pre-split baseline. The CPU-only path is unchanged. --- studio/setup.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/studio/setup.ps1 b/studio/setup.ps1 index dac308966f..cb0d44391c 100644 --- a/studio/setup.ps1 +++ b/studio/setup.ps1 @@ -1208,6 +1208,12 @@ if ((Test-Path $LlamaServerBin) -and -not $NeedRebuild) { $CmakeArgs += "-DCUDAToolkit_ROOT=$CudaToolkitRoot" $CmakeArgs += "-DCUDA_TOOLKIT_ROOT_DIR=$CudaToolkitRoot" $CmakeArgs += "-DCMAKE_CUDA_COMPILER=$NvccPath" + # Unsloth-aligned CUDA tuning flags (restored -- keep GPU build behavior unchanged) + $CmakeArgs += '-DGGML_CUDA_FA_ALL_QUANTS=ON' + $CmakeArgs += '-DGGML_CUDA_F16=OFF' + $CmakeArgs += '-DGGML_CUDA_GRAPHS=OFF' + $CmakeArgs += '-DGGML_CUDA_FORCE_CUBLAS=OFF' + $CmakeArgs += '-DGGML_CUDA_PEER_MAX_BATCH_SIZE=8192' if ($CudaArch) { # Validate nvcc actually supports this architecture if (Test-NvccArchSupport -NvccExe $NvccPath -Arch $CudaArch) {