Skip to content

Commit 79a1705

Browse files
rgerganovNeoZhangJianyu
authored andcommitted
ggml : do not define GGML_USE_CUDA when building with GGML_BACKEND_DL (ggml-org#11211)
Build fails when using HIP and GGML_BACKEND_DL: ``` /usr/bin/ld: ../ggml/src/libggml.so: undefined reference to `ggml_backend_cuda_reg' collect2: error: ld returned 1 exit status ``` This patch fixes this.
1 parent 0349467 commit 79a1705

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml/src/ggml-hip/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ ggml_add_backend_library(ggml-hip
7070
)
7171

7272
# TODO: do not use CUDA definitions for HIP
73-
target_compile_definitions(ggml PUBLIC GGML_USE_CUDA)
73+
if (NOT GGML_BACKEND_DL)
74+
target_compile_definitions(ggml PUBLIC GGML_USE_CUDA)
75+
endif()
7476

7577
add_compile_definitions(GGML_USE_HIP)
7678

0 commit comments

Comments
 (0)