Commit 3dffd18

mo khan <mo@mokhan.ca>
2026-09-08 02:49:19
prefer vulkan over hip in backend auto-detection
Measured on gfx1151 (Strix Halo): Vulkan decodes ~30% faster than HIP/ ROCm here (~47 vs ~36 tok/s, Qwen2.5-Coder-7B-Q4_K_M), prefill roughly even. HIP remains available and still auto-detected when Vulkan isn't, or via ELELEM_LLAMA_BACKEND=hip.
1 parent c3b5cdb
Changed files (1)
ext
elelem
ext/elelem/llama/extconf.rb
@@ -66,8 +66,8 @@ def detect_backend
   return forced unless forced.empty? || forced == "auto"
 
   return "cuda" if which("nvcc")
-  return "hip" if hip_available?
   return "vulkan" if which("glslc") && vulkan_loader?
+  return "hip" if hip_available?
   "cpu"
 end