Skip to content

Commit

Permalink
fix checking GPU on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Feb 22, 2025
1 parent 9cc514d commit 75a2d60
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions images/benchmark-llm/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@
def get_llama_cpp_path():
"""Check if GPU/CUDA is available, if not, use CPU-build of llama.cpp."""
llama_cpp_path = "/llama_cpp_gpu"
# ARM64 doesn't have the CUDA binaries, so we need to use the CPU-build with early return
if not path.exists(llama_cpp_path):
logger.info("Using CPU-build of llama.cpp")
return "/llama_cpp_cpu"
# check if we can start the CUDA binary
result = run(["./llama-cli", "--version"], cwd=llama_cpp_path, capture_output=True)
if result.returncode != 0:
llama_cpp_path = "/llama_cpp_cpu"
Expand Down

0 comments on commit 75a2d60

Please sign in to comment.