Build llama.cpp in-tree, auto-detect driver CUDA version for compatible toolkit

This commit is contained in:
Roland Tannous 2026-02-28 07:45:40 +00:00
commit afa1344452
3 changed files with 7 additions and 7 deletions

View file

@ -100,13 +100,13 @@ class LlamaCppBackend:
if build_path.is_file():
return str(build_path)
# 3. Windows MSVC build (setup.ps1 builds here — Release config)
# 3. Windows MSVC build (Release config, in-tree — matches setup.ps1)
if sys.platform == "win32":
# In-tree
# In-tree (primary — setup.ps1 now builds here)
win_path = project_root / "llama.cpp" / "build" / "bin" / "Release" / binary_name
if win_path.is_file():
return str(win_path)
# ~/.unsloth (setup.ps1 default location)
# Legacy: ~/.unsloth (older setup.ps1 versions built here)
home_path = Path.home() / ".unsloth" / "llama.cpp" / "build" / "bin" / "Release" / binary_name
if home_path.is_file():
return str(home_path)