"docs/source/vscode:/vscode.git/clone" did not exist on "186ef59283891fdaaf377c97da2f1872afbf5b7f"
Unverified Commit a4770107 authored by Daniel Hiltgen's avatar Daniel Hiltgen Committed by GitHub
Browse files

vulkan: enable flash attention (#12937)

Also adjusts the vulkan windows build pattern to match recent changes in other backends
so incremental builds are faster.
parent ef549d51
...@@ -432,7 +432,8 @@ func FlashAttentionSupported(l []DeviceInfo) bool { ...@@ -432,7 +432,8 @@ func FlashAttentionSupported(l []DeviceInfo) bool {
supportsFA := gpu.Library == "cpu" || supportsFA := gpu.Library == "cpu" ||
gpu.Name == "Metal" || gpu.Library == "Metal" || gpu.Name == "Metal" || gpu.Library == "Metal" ||
(gpu.Library == "CUDA" && gpu.DriverMajor >= 7 && !(gpu.ComputeMajor == 7 && gpu.ComputeMinor == 2)) || (gpu.Library == "CUDA" && gpu.DriverMajor >= 7 && !(gpu.ComputeMajor == 7 && gpu.ComputeMinor == 2)) ||
gpu.Library == "ROCm" gpu.Library == "ROCm" ||
gpu.Library == "Vulkan"
if !supportsFA { if !supportsFA {
return false return false
......
...@@ -187,11 +187,11 @@ function buildROCm() { ...@@ -187,11 +187,11 @@ function buildROCm() {
function buildVulkan(){ function buildVulkan(){
if ($env:VULKAN_SDK) { if ($env:VULKAN_SDK) {
write-host "Building Vulkan backend libraries" write-host "Building Vulkan backend libraries"
& cmake --fresh --preset Vulkan --install-prefix $script:DIST_DIR -DOLLAMA_RUNNER_DIR="vulkan" & cmake -B build\vulkan --preset Vulkan --install-prefix $script:DIST_DIR -DOLLAMA_RUNNER_DIR="vulkan"
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
& cmake --build --preset Vulkan --config Release --parallel $script:JOBS & cmake --build build\vulkan --target ggml-vulkan --config Release --parallel $script:JOBS
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
& cmake --install build --component Vulkan --strip & cmake --install build\vulkan --component Vulkan --strip
if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)} if ($LASTEXITCODE -ne 0) { exit($LASTEXITCODE)}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment