Skip to content

Commit

Permalink
llama.cpp GGML_HIP=ON fix
Browse files Browse the repository at this point in the history
- fix the flag that enables building llama.cpp
  for amd GPU's. Flag has been changed on new llama.cpp releases
  to -DGGML_HIP=on
- update also llama.cpp to latest version b4601

fixes: #206

Signed-off-by: Mika Laitio <[email protected]>
  • Loading branch information
lamikr committed Jan 31, 2025
1 parent 9839139 commit 1c1f4af
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions binfo/extra/llama_cpp.binfo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BINFO_APP_SRC_TOPDIR_BASENAME=${BINFO_APP_NAME}
BINFO_APP_SRC_DIR="${SDK_SRC_ROOT_DIR}/${BINFO_APP_SRC_TOPDIR_BASENAME}"
BINFO_APP_UPSTREAM_REPO_URL=https://github.com/ggerganov/llama.cpp.git
#use rocm version specific default git tag
BINFO_APP_UPSTREAM_REPO_VERSION_TAG=b4524
BINFO_APP_UPSTREAM_REPO_VERSION_TAG=b4601

CFG_TEMP1=-DAMDGPU_TARGETS="${SEMICOLON_SEPARATED_GPU_TARGET_LIST_DEFAULT}"

Expand All @@ -13,5 +13,12 @@ BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DCMAKE_PREFIX_PATH=${INSTALL_DIR_PR
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${CFG_TEMP1}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DROCM_PATH=${INSTALL_DIR_PREFIX_SDK_ROOT}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DHIPCC=${SDK_CXX_COMPILER_HIPCC}"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DGGML_HIPBLAS=1"
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} -DGGML_HIP=ON"
# TODO: We should add a new function
# is_only_apu_gpus_selected()
# to checks whether only integrated GPU's have been selected as a build target
# and then enable -DGGML_HIP_UMA=ON
# This allows sharing the memory between CPU and IGPU and increase the performance.
# Note that if there are discrete GPU's, then this should not be enabled as it would decrease the performance.
#-DGGML_HIP_UMA=ON
BINFO_APP_CMAKE_CFG="${BINFO_APP_CMAKE_CFG} ${BINFO_APP_SRC_DIR}"

0 comments on commit 1c1f4af

Please sign in to comment.