From: fxzjshm Date: Tue, 4 Feb 2025 18:18:38 +0000 (+0800) Subject: HIP: force max threads per block to be 1024 (#11621) X-Git-Tag: upstream/0.0.4719~80 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=3ec9fd4b77b6aca03a3c2bf678eae3f9517d6904;p=pkg%2Fggml%2Fsources%2Fllama.cpp HIP: force max threads per block to be 1024 (#11621) Some old/vendor forked version of llvm still use 256. Explicitly set it to 1024 to align with upstream llvm. Signed-off-by: fxzjshm --- diff --git a/ggml/src/ggml-hip/CMakeLists.txt b/ggml/src/ggml-hip/CMakeLists.txt index eb03e10f..f4a46836 100644 --- a/ggml/src/ggml-hip/CMakeLists.txt +++ b/ggml/src/ggml-hip/CMakeLists.txt @@ -46,6 +46,9 @@ endif() message(STATUS "HIP and hipBLAS found") +# Workaround old compilers +set(CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} --gpu-max-threads-per-block=1024") + file(GLOB GGML_HEADERS_ROCM "../ggml-cuda/*.cuh") list(APPEND GGML_HEADERS_ROCM "../../include/ggml-cuda.h")